diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index f014492..3644ef1 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -32,20 +32,23 @@ jobs: # Create a zip file with all files required by the system to add to the release - run: | 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 - - name: setup go - uses: https://github.com/actions/setup-go@v4 - with: - go-version: ">=1.20.1" - - - name: Use Go Action - id: use-go-action - uses: https://gitea.com/actions/release-action@main - with: - files: |- - ./fvtt-ecryme-${{github.event.release.tag_name}}.zip - system.json - api_key: "${{secrets.ALLOW_PUSH_RELEASE}}" + - name: Upload release assets + env: + GITEA_TOKEN: ${{ secrets.ALLOW_PUSH_RELEASE }} + TAG_NAME: ${{ github.event.release.tag_name }} + REPO: ${{ gitea.repository }} + run: | + RELEASE_ID=$(curl -s -H "Authorization: token $GITEA_TOKEN" \ + "https://www.uberwald.me/gitea/api/v1/repos/$REPO/releases/tags/$TAG_NAME" | jq -r '.id') + curl -s -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/zip" \ + --data-binary @./fvtt-ecryme-$TAG_NAME.zip \ + "https://www.uberwald.me/gitea/api/v1/repos/$REPO/releases/$RELEASE_ID/assets?name=fvtt-ecryme-$TAG_NAME.zip" + 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"