v8.0.0 WFRP4e v8.x Compatibility; Add XP enhancements #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Creation | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Get Foundry CLI | |
- name: Install FVTT CLI | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- run: npm i -g @foundryvtt/foundryvtt-cli | |
# Seutup python and compile compendium packs | |
- name: Setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- run: python pack_util.py pack | |
# Get Module ID | |
- name: Get Module ID | |
id: moduleID | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: 'module.json' | |
prop_path: 'id' | |
# Substitute the Manifest and Download URLs in the manifest file | |
- name: Substitute Manifest and Download Links For Versioned Ones | |
id: sub_manifest_link_version | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: "module.json" | |
env: | |
version: ${{github.event.release.tag_name}} | |
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json | |
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/${{steps.moduleID.outputs.prop}}.zip | |
# Create a zip file with all files required by the system to add to the release | |
- run: zip -r ./${{steps.moduleID.outputs.prop}}.zip apps/ assets/ css/ lang/ modules/ packs/ scripts/ tables/ templates/ CHANGELOG.md LICENSE README.md module.json ${{steps.moduleID.outputs.prop}}.mjs | |
# Create a release for this specific version | |
- name: Update Release with Files | |
id: create_version_release | |
uses: ncipollo/release-action@v1.10.0 | |
with: | |
allowUpdates: true # Set this to false if you want to prevent updating existing releases | |
name: ${{ github.event.release.name }} | |
# draft: ${{ github.event.release.unpublished }} | |
# prerelease: ${{ github.event.release.prerelease }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "./module.json, ./${{steps.moduleID.outputs.prop}}.zip" | |
tag: ${{ github.event.release.tag_name }} | |
body: ${{ github.event.release.body }} | |
generateReleaseNotes: true | |
discussionCategory: "Announcements" |