Skip to content

fix: Keeping up with the Macro Faeries. #2234

fix: Keeping up with the Macro Faeries.

fix: Keeping up with the Macro Faeries. #2234

Workflow file for this run

name: Test and release
# Run the workflow when a Pull Request is opened or when changes are pushed to main on 'xdy/xdy-pf2e-workbench' (i.e. don't run on forks)
on:
pull_request:
push:
branches: [ main ]
jobs:
release:
# Only release on push to main on xdy/xdy-pf2e-workbench
if: github.event_name == 'push' && (github.ref == 'refs/heads/main') && github.repository == 'xdy/xdy-pf2e-workbench'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
# Not sure this is the right way to do it, but, eh, it works.
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- uses: stefanzweifel/git-auto-commit-action@v5.0.0
with:
commit_message: "chore: Update submodules"
- name: Setup Node.js
uses: actions/setup-node@v4.0.0
with:
node-version: 18.x
cache: 'npm'
- name: Install
run: npm install
- name: install fvtt cli
id: fvtt-install
run: npm install -g @foundryvtt/foundryvtt-cli
- name: Build packs
run: npm run build:packs
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Get tag
run: echo "WORKBENCH_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Install playwright
run: npx playwright install
- name: Install foundry-publish
run: npm install -g @ghost-fvtt/foundry-publish
- name: Publish to Foundry VTT Repo
id: publish_foundry_repo
if: github.event_name == 'push' && (github.ref == 'refs/heads/main') && github.repository == 'xdy/xdy-pf2e-workbench'
#run: foundry-publish --useNewPackageAdministrationInterface --deleteObsoleteVersions
run: foundry-publish
env:
FVTT_MANIFEST_PATH: 'static/module.json'
FVTT_PACKAGE_ID: "xdy-pf2e-workbench"
FVTT_USE_NEW_PACKAGE_ADMINISTRATION_INTERFACE: true
FVTT_USERNAME: ${{ secrets.FOUNDRY_ADMIN_USERNAME }}
FVTT_PASSWORD: ${{ secrets.FOUNDRY_ADMIN_PASSWORD }}