.
All checks were successful
Build & Release / build-latest (push) Successful in 9m36s
Build & Release / version-release (push) Has been skipped

This commit is contained in:
Salastil
2025-11-16 15:29:27 -05:00
parent 19ca76d8c2
commit 2cd6cdbffa

View File

@@ -43,14 +43,31 @@ jobs:
git push origin latest git push origin latest
- name: Create Latest Release - name: Create Latest Release
uses: actions/release-action@v1 run: |
with: # Create release using Gitea API
token: ${{ secrets.CI_TOKEN }} RELEASE_DATA=$(cat <<EOF
tag_name: latest {
name: Latest Build (Development) "tag_name": "latest",
body: "Automated build from master branch. This is a development build." "name": "Latest Build (Development)",
prerelease: true "body": "Automated build from master branch commit ${{ github.sha }}",
files: Sneedchat-Discord-Bridge "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: version-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -75,7 +92,31 @@ jobs:
GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-darwin-arm64 . GOOS=darwin GOARCH=arm64 go build -o dist/Sneedchat-Discord-Bridge-darwin-arm64 .
- name: Create Version Release - name: Create Version Release
uses: actions/release-action@v1 run: |
with: # Create release using Gitea API
token: ${{ secrets.CI_TOKEN }} RELEASE_DATA=$(cat <<EOF
files: dist/* {
"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