Skip to content

v3.4.68

v3.4.68 #340

Workflow file for this run

name: ddb-importer build
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'package.json'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
- name: Build icon json
run: ./icon.sh
- name: Create Release Zip
run: zip -r ./ddb-importer.zip module.json dist icons handlebars css img lang data vendor macros 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.release_version }} # Use the version in the name "${{ env.version }}"
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json,./ddb-importer.zip' # don't forget to rename module zip thing
tag: ${{ steps.get-version.outputs.release_version }} # Use the version as the tag
- name: Create Latest Release
id: create_latest_release
uses: ncipollo/release-action@v1
if: endsWith(github.ref, 'main') # 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,./ddb-importer.zip' # don't forget to rename module zip thing
tag: latest
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_HOOK }}
DISCORD_USERNAME: "Head of Marketing (Krum)"
uses: Ilshidur/action-discord@0.3.2
with:
args: 'DDB Importer ${{ steps.get-version.outputs.release_version }} has been published by our development Kobolds!'
# - name: FoundryVTT AutoPublish
# uses: Varriount/fvtt-autopublish@v1.0.9
# with:
# username: ${{ secrets.FOUNDRY_ADMIN_USER }}
# password: ${{ secrets.FOUNDRY_ADMIN_PW }}
# module-id: ${{ secrets.FOUNDRY_MODULE_ID }}
# manifest-url: https://github.com/${{ github.repository }}/releases/download/${{ env.release_version }} /module.json
# manifest-file: ./module.json