Skip to content

Commit

Permalink
try new foundry release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
esheyw committed Jan 28, 2024
1 parent d13349f commit cdd37e7
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip

- name: Get Manifest Variables
id: manifest_variables
uses: antifree/[email protected]
with:
filename: module.json
prefix: manifest
# - name: Get Manifest Variables
# id: manifest_variables
# uses: antifree/[email protected]
# with:
# filename: module.json
# prefix: manifest

# Create a zip file with all files required by the module to add to the release
- run: zip -r ./module.zip module.json LICENSE styles/*.css styles/*.map scripts/ templates/ lang/
Expand All @@ -57,23 +57,17 @@ jobs:
artifacts: "./module.json, ./module.zip"
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
- name: Foundry Package Admin Release
id: fvtt_release
run: |
curl -X POST "https://api.foundryvtt.com/_api/packages/release_version/" \
-H "Content-Type: application/json" \
-H "Authorization: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}" \
-d '{
"id": "${{ github.event.repository.name }}",
"dry-run": true,
"release": {
"version": "${{ github.event.release.tag_name }}",
"manifest": "https://github.com/${{ github.repository }}/releases/download/${{github.event.release.tag_name}}/module.json",
"notes": "https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md",
"compatibility": {
"minimum": "${{ env.manifest_compatibility_minimum }}",
"verified": "${{ env.manifest_compatibility_verified }}",
"maximum": "${{ env.manifest_compatibility_maximum }}"
}
}
}'
# - name: Foundry Package Admin Release
# uses: fjogeleit/http-request-action@v1
# with:
# url: 'https://api.foundryvtt.com/_api/packages/release_version'
# method: 'POST'
# customHeaders: '{"Content-Type": "application/json", "Authorization": "${{ secrets.FOUNDRY_RELEASE_TOKEN }}"}'
# data: '{"dry_run": true, "id" : "chris-premades", "release": {"version" : "${{ github.event.release.tag_name }}", manifest: "https://github.com/${{ github.repository }}/releases/download/${{github.event.release.tag_name}}/module.json", "notes" : "https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md", "compatibility" : {"minimum": "${{ env.manifest_compatibility_minimum }}", "verified": "${{ env.manifest_compatibility_verified }}", "maximum": "${{ env.manifest_compatibility_maximum }}"} } }'

- name: Publish Module to FoundryVTT Website
id: publish-to-foundry-website
uses: cs96and/FoundryVTT-release-package@v1
with:
package-token: ${{ secrets.FOUNDRY_RELEASE_TOKEN }}
manifest-url: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.json

0 comments on commit cdd37e7

Please sign in to comment.