Release 2.0.1 #3
Workflow file for this run
This file contains hidden or 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@v2 | |
| # Run npm install and npm run build | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build | |
| # Substitute manifest and download URLs in module.json | |
| - name: Substitute manifest and download links for versioned ones | |
| id: sub_manifest_link_version | |
| uses: microsoft/variable-substitution@v1 | |
| with: | |
| files: 'multi-token-edit/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}}/multi-token-edit.zip | |
| # Create zip file | |
| - run: cd multi-token-edit && zip -r ./multi-token-edit.zip module.json templates/ styles/ packs/ lang/ images/ data/ bundle/ | |
| # Update release with zip files | |
| - name: Update Release with Files | |
| id: update_version_release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true # set this to false if you want to prevent updating existing releases | |
| name: ${{ github.event.release.name }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| prerelease: github.event.release.prerelease, | |
| artifacts: 'multi-token-edit/module.json, multi-token-edit/multi-token-edit.zip' | |
| tag: ${{ github.event.release.tag_name }} | |
| body: ${{ github.event.release.body }} | |
| # Publish the release if it has been set as latest | |
| - name: Publish Module to FoundryVTT Website | |
| id: publish-to-foundry-website | |
| if: github.event.release.prerelease == false | |
| uses: cs96and/FoundryVTT-release-package@v1.0.2 | |
| with: | |
| package-token: ${{ secrets.PACKAGE_TOKEN }} | |
| manifest-url: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.json | |
| notes-url: https://github.com/${{github.repository}}/releases/tag/${{github.event.release.tag_name}} | |
| dry-run: true # remove to perform a proper release |