.
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
- 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