fix: replace gitea.com release action with direct API upload

This commit is contained in:
2026-07-21 22:01:32 +02:00
parent f08a741708
commit 31b22fad68
+17 -14
View File
@@ -32,20 +32,23 @@ jobs:
# Create a zip file with all files required by the system to add to the release # Create a zip file with all files required by the system to add to the release
- run: | - run: |
apt update -y apt update -y
apt install -y zip apt install -y zip jq
- run: zip -r ./fvtt-ecryme-${{github.event.release.tag_name}}.zip system.json README.md LICENSE.txt changelog.md css/ fonts/ images/ lang/ modules/ styles/ packs/ templates/ translated/ welcome-message-ecryme.html - run: zip -r ./fvtt-ecryme-${{github.event.release.tag_name}}.zip system.json README.md LICENSE.txt changelog.md css/ fonts/ images/ lang/ modules/ styles/ packs/ templates/ translated/ welcome-message-ecryme.html
- name: setup go - name: Upload release assets
uses: https://github.com/actions/setup-go@v4 env:
with: GITEA_TOKEN: ${{ secrets.ALLOW_PUSH_RELEASE }}
go-version: ">=1.20.1" TAG_NAME: ${{ github.event.release.tag_name }}
REPO: ${{ gitea.repository }}
- name: Use Go Action run: |
id: use-go-action RELEASE_ID=$(curl -s -H "Authorization: token $GITEA_TOKEN" \
uses: https://gitea.com/actions/release-action@main "https://www.uberwald.me/gitea/api/v1/repos/$REPO/releases/tags/$TAG_NAME" | jq -r '.id')
with: curl -s -H "Authorization: token $GITEA_TOKEN" \
files: |- -H "Content-Type: application/zip" \
./fvtt-ecryme-${{github.event.release.tag_name}}.zip --data-binary @./fvtt-ecryme-$TAG_NAME.zip \
system.json "https://www.uberwald.me/gitea/api/v1/repos/$REPO/releases/$RELEASE_ID/assets?name=fvtt-ecryme-$TAG_NAME.zip"
api_key: "${{secrets.ALLOW_PUSH_RELEASE}}" curl -s -H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @./system.json \
"https://www.uberwald.me/gitea/api/v1/repos/$REPO/releases/$RELEASE_ID/assets?name=system.json"