.
This commit is contained in:
@@ -43,14 +43,31 @@ jobs:
|
||||
git push origin latest
|
||||
|
||||
- name: Create Latest Release
|
||||
uses: actions/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CI_TOKEN }}
|
||||
tag_name: latest
|
||||
name: Latest Build (Development)
|
||||
body: "Automated build from master branch. This is a development build."
|
||||
prerelease: true
|
||||
files: Sneedchat-Discord-Bridge
|
||||
run: |
|
||||
# Create release using Gitea API
|
||||
RELEASE_DATA=$(cat <<EOF
|
||||
{
|
||||
"tag_name": "latest",
|
||||
"name": "Latest Build (Development)",
|
||||
"body": "Automated build from master branch commit ${{ github.sha }}",
|
||||
"draft": false,
|
||||
"prerelease": true
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
RELEASE_ID=$(curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$RELEASE_DATA" \
|
||||
"https://git.salastil.com/api/v1/repos/Salastil/Sneedchat-Discord-Bridge-Go/releases" | jq -r '.id')
|
||||
|
||||
# Upload binary to release
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @Sneedchat-Discord-Bridge \
|
||||
"https://git.salastil.com/api/v1/repos/Salastil/Sneedchat-Discord-Bridge-Go/releases/$RELEASE_ID/assets?name=Sneedchat-Discord-Bridge"
|
||||
|
||||
version-release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -75,7 +92,31 @@ jobs:
|
||||
GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-darwin-arm64 .
|
||||
|
||||
- name: Create Version Release
|
||||
uses: actions/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CI_TOKEN }}
|
||||
files: dist/*
|
||||
run: |
|
||||
# Create release using Gitea API
|
||||
RELEASE_DATA=$(cat <<EOF
|
||||
{
|
||||
"tag_name": "${{ github.ref_name }}",
|
||||
"name": "Release ${{ github.ref_name }}",
|
||||
"body": "Release ${{ github.ref_name }}",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
RELEASE_ID=$(curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$RELEASE_DATA" \
|
||||
"https://git.salastil.com/api/v1/repos/Salastil/Sneedchat-Discord-Bridge-Go/releases" | jq -r '.id')
|
||||
|
||||
# Upload all binaries
|
||||
for file in dist/*; do
|
||||
filename=$(basename "$file")
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.CI_TOKEN }}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @"$file" \
|
||||
"https://git.salastil.com/api/v1/repos/Salastil/Sneedchat-Discord-Bridge-Go/releases/$RELEASE_ID/assets?name=$filename"
|
||||
done
|
||||
Reference in New Issue
Block a user