- Replace gitea.com/actions/release-action with direct API calls - Upload module.zip and module.json to existing release using Gitea API - Use release.id from event context to target correct release Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -48,19 +48,21 @@ jobs:
|
||||
|
||||
- run: node scripts/package.mjs
|
||||
|
||||
- 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: |-
|
||||
./module.zip
|
||||
module.json
|
||||
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
|
||||
- name: Upload release assets
|
||||
run: |
|
||||
# Upload module.zip
|
||||
curl -s -X POST \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
-H "Authorization: token ${{secrets.ALLOW_PUSH_RELEASE}}" \
|
||||
--data-binary @./module.zip \
|
||||
"https://www.uberwald.me/api/v1/repos/${{gitea.repository}}/releases/${{gitea.event.release.id}}/assets?name=module.zip"
|
||||
|
||||
# Upload module.json
|
||||
curl -s -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: token ${{secrets.ALLOW_PUSH_RELEASE}}" \
|
||||
--data-binary @./module.json \
|
||||
"https://www.uberwald.me/api/v1/repos/${{gitea.repository}}/releases/${{gitea.event.release.id}}/assets?name=module.json"
|
||||
|
||||
- name: Publish to Foundry server
|
||||
uses: https://github.com/djlechuck/foundryvtt-publish-package-action@v1
|
||||
|
||||
Reference in New Issue
Block a user