fix(release): replace missing forgejo-release action with direct Forgejo API calls

The forgejo-release@v1 action was never published to the Forgejo
packages registry, causing the release workflow to fail with a 404
when cloning the action. Replace it with curl calls to the Forgejo
API: POST /releases to create the release, then POST /assets for
each artifact file.
This commit is contained in:
eddy 2026-08-03 14:23:20 +02:00
commit 2b7c2b8450

View file

@ -46,9 +46,26 @@ jobs:
sha256sum * > checksums.txt
- name: Create Forgejo release
uses: https://git.eddydevink.nl/api/packages/eddy/actions/forgejo-release@v1
with:
token: ${{ secrets.FORGEJO_TOKEN }}
tag: ${{ github.ref_name }}
title: ${{ github.ref_name }}
files: release/artifacts/*
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
API="https://git.eddydevink.nl/api/v1/repos/eddy/Project_SylDa/releases"
RELEASE=$(curl -s -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"$TAG\", \"name\": \"$TAG\"}" \
"$API")
RELEASE_ID=$(echo "$RELEASE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
echo "Created release $TAG (id=$RELEASE_ID)"
for file in release/artifacts/*; do
name=$(basename "$file")
echo "Uploading $name..."
curl -s -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary "@$file" \
"$API/$RELEASE_ID/assets?name=$name" > /dev/null
done
echo "Release $TAG published with $(ls release/artifacts | wc -l) assets"