attempt to use the API before installing Go
All checks were successful
Build / build (push) Successful in 13s
Release / release (push) Successful in 15s

This commit is contained in:
Gregory Gauthier 2026-02-02 11:55:29 +00:00
parent 7ee4538eff
commit beda41fdef

View File

@ -34,9 +34,31 @@ jobs:
ls cordle-${VERSION}-linux-amd64.tar.gz* # For debugging ls cordle-${VERSION}-linux-amd64.tar.gz* # For debugging
- name: Create Release - name: Create Release
uses: actions/release-action@main env:
with: GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
files: | run: |
release/*.tar.gz VERSION=${GITHUB_REF#refs/tags/}
release/*.sha256
api_key: ${{ secrets.RELEASE_TOKEN }} # Create release
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${VERSION}\",
\"name\": \"Cordle ${VERSION}\",
\"body\": \"Release ${VERSION}\"
}" > release_response.json
RELEASE_ID=$(cat release_response.json | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
# Upload tarball
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=cordle-${VERSION}-linux-amd64.tar.gz" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/gzip" \
--data-binary @release/cordle-${VERSION}-linux-amd64.tar.gz
# Upload checksum
curl -X POST "https://repos.gmgauthier.com/api/v1/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=cordle-${VERSION}-linux-amd64.tar.gz.sha256" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: text/plain" \
--data-binary @release/cordle-${VERSION}-linux-amd64.tar.gz.sha256