1 Commits

Author SHA1 Message Date
30f4ebbd6d fix paths
All checks were successful
Build and Release / build-and-release (386, linux, linux-386) (push) Successful in 32s
Build and Release / build-and-release (386, windows, windows-386) (push) Successful in 33s
Build and Release / build-and-release (amd64, linux, linux-amd64) (push) Successful in 37s
Build and Release / build-and-release (amd64, windows, windows-amd64) (push) Successful in 38s
Build and Release / build-and-release (arm, 7, linux, linux-armv7) (push) Successful in 42s
Build and Release / build-and-release (arm64, linux, linux-arm64) (push) Successful in 42s
Build and Release / build-and-release (ppc64le, linux, linux-ppc64le) (push) Successful in 49s
2025-12-23 15:39:01 +01:00

View File

@@ -67,31 +67,39 @@ jobs:
-o bin/${OUTPUT_NAME} ./cmd/safelineApi -o bin/${OUTPUT_NAME} ./cmd/safelineApi
echo "BINARY_NAME=${OUTPUT_NAME}" >> $GITHUB_ENV echo "BINARY_NAME=${OUTPUT_NAME}" >> $GITHUB_ENV
- name: Upload Release Asset - name: Create or Update Release
uses: gitea-github-actions/actions/gitea-release@main run: |
with: VERSION="${{ steps.version.outputs.VERSION }}"
files: bin/${{ env.BINARY_NAME }} REPO="${{ gitea.repository }}"
draft: false SERVER="${{ gitea.server_url }}"
prerelease: false TOKEN="${{ secrets.GITEA_TOKEN }}"
allowUpdates: true
title: Release ${{ steps.version.outputs.VERSION }}
body: |
# SafelineAPI ${{ steps.version.outputs.VERSION }}
## Available Downloads # Try to create release (ignore error if already exists)
curl -X POST "${SERVER}/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"tag_name": "'${VERSION}'",
"target_commitish": "main",
"name": "Release '${VERSION}'",
"body": "# SafelineAPI '${VERSION}'\n\n## Available Downloads\n\n### Linux\n- **amd64**: safelineApi-linux-amd64\n- **ARM64**: safelineApi-linux-arm64\n- **ARMv7**: safelineApi-linux-armv7\n- **386**: safelineApi-linux-386\n- **PowerPC 64LE**: safelineApi-linux-ppc64le\n\n### Windows\n- **amd64**: safelineApi-windows-amd64.exe\n- **386**: safelineApi-windows-386.exe",
"draft": false,
"prerelease": false
}' || true
### Linux - name: Upload Binary Asset
- **amd64**: safelineApi-linux-amd64 run: |
- **ARM64**: safelineApi-linux-arm64 VERSION="${{ steps.version.outputs.VERSION }}"
- **ARMv7**: safelineApi-linux-armv7 REPO="${{ gitea.repository }}"
- **386**: safelineApi-linux-386 SERVER="${{ gitea.server_url }}"
- **PowerPC 64LE**: safelineApi-linux-ppc64le TOKEN="${{ secrets.GITEA_TOKEN }}"
BINARY="${{ env.BINARY_NAME }}"
### Windows # Get release ID
- **amd64**: safelineApi-windows-amd64.exe RELEASE_ID=$(curl -s "${SERVER}/api/v1/repos/${REPO}/releases/tags/${VERSION}" \
- **386**: safelineApi-windows-386.exe -H "Authorization: token ${TOKEN}" | grep '"id"' | head -1 | grep -o '[0-9]*')
Built at: ${{ github.event.head_commit.timestamp }} # Upload the binary
env: curl -X POST "${SERVER}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} -H "Authorization: token ${TOKEN}" \
GITEA_SERVER: ${{ gitea.server_url }} -F "attachment=@bin/${BINARY}" || true