Skip to content

v4.2.7

v4.2.7 #79

Workflow file for this run

name: Tokenizer Build
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'package.json'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Version # Run the script that returns the version from `module.json`
shell: bash
id: get-version
run: echo "release_version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT
- name: Build module.json
run: node ./.github/workflows/build-module-json.js | jq . > module.json
- run: npm ci
- name: Webpack
run: npm run build
- run: zip -r ./vtta-tokenizer.zip module.json dist templates css img lang vendor LICENSE.md # Add folders/files here
- name: Create Release # Create an additional release for this version
id: create_versioned_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false # set to false if you do not want to allow updates on existing releases
name: Release ${{ steps.get-version.outputs.version }} # Use the version in the name
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json,./vtta-tokenizer.zip' # don't forget to rename module zip thing
tag: ${{ steps.get-version.outputs.release_version }} # Use the version as the tag
- name: Create Release
id: create_latest_release
uses: ncipollo/release-action@v1
if: endsWith(github.ref, 'master') # Only update the latest release when pushing to the master branch
with:
allowUpdates: true
name: Latest
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json,./vtta-tokenizer.zip' # don't forget to rename module zip thing
tag: latest
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_HOOK }}
DISCORD_USERNAME: "Squint - Intern"
uses: Ilshidur/action-discord@0.3.2
with:
args: "Squint (Intern) has released Tokenizer ${{ steps.get-version.outputs.release_version }}."
# - name: FoundryVTT AutoPublish
# uses: Varriount/fvtt-autopublish@latest
# with:
# username: ${{ secrets.FOUNDRY_ADMIN_USER }}
# password: ${{ secrets.FOUNDRY_ADMIN_PW }}
# module-id: ${{ FOUNDRY_MODULE_ID }}
# manifest-url: https://github.com/${{ github.repository }}/releases/download/${{ steps.get-version.outputs.version }}/module.json
# manifest-file: ./module.json