Release PF2E Action Browser #5
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 PF2E Action Browser | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: | | |
npm ci | |
npm run build | |
- name: Update Manifest | |
run: | | |
MODULE_VERSION=$(grep -oP '(?<="version": ")[^"]+' dist/module.json | tr -d '\n') | |
perl -pi -E "s|latest/download/pf2e-action-browser\\.zip|download/$MODULE_VERSION/pf2e-action-browser.zip|" dist/module.json | |
echo "moduleVersion=$MODULE_VERSION" >> $GITHUB_ENV | |
- name: Zip Files | |
working-directory: ./dist | |
run: zip -r ./pf2e-action-browser.zip ./* | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ env.moduleVersion }} | |
allowUpdates: false | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "./dist/module.json,./dist/pf2e-action-browser.zip" | |
tag: ${{ env.moduleVersion }} |