feat: prepare 12.1.3 #13
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: Create files for GitHub Release | |
env: | |
project_url: 'https://github.com/${{ github.repository }}' | |
latest_manifest_url: 'https://github.com/${{ github.repository }}/releases/latest/download/module.json' | |
release_url: 'https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/module.zip' | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: yarn install | |
run: yarn install | |
- name: Pack compendiums | |
run: yarn run pack-packs | |
- name: Modify manifest with release-specific values | |
id: sub_manifest_link_version | |
uses: cschleiden/replace-tokens@v1 | |
with: | |
files: 'module.json' | |
env: | |
VERSION: ${{ github.ref_name }} | |
URL: ${{ env.project_url }} | |
MANIFEST: ${{ env.latest_manifest_url }} | |
DOWNLOAD: ${{ env.release_url }} | |
- name: Create archive | |
run: | | |
zip \ | |
--recurse-paths \ | |
./module.zip \ | |
module.json \ | |
README.md \ | |
CHANGELOG.md \ | |
LICENSE \ | |
scripts/ \ | |
packs/ \ | |
translations/ \ | |
assets/ | |
- name: Update release with files | |
id: create_version_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: ${{ github.event.release.name }} | |
draft: ${{ github.event.release.unpublished }} | |
prerelease: ${{ github.event.release.prerelease }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './module.json, ./module.zip' | |
tag: ${{ github.event.release.tag_name }} | |
body: ${{ github.event.release.body }} | |
- name: Publish the package | |
id: publish | |
uses: djlechuck/foundryvtt-publish-package-action@v1 | |
with: | |
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }} | |
manifest: 'https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/module.json' |