Skip to content

dnd5e 4+ support

dnd5e 4+ support #149

Workflow file for this run

name: Create Module Files For GitHub Release
env:
GITHUB_URL: "https://github.com/${{ github.repository }}"
TAG: ${{ github.event.release.tag_name || github.ref_name }}
on:
release:
types: [ published ]
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Modify Module Manifest With Release-Specific Values
uses: cschleiden/[email protected]
with:
files: 'module.json'
- name: Downloading Dependencies
run: npm ci --omit=dev
- name: Build
run: npm run build
- name: Create Module Archive
run: |
zip \
--recurse-paths \
./module.zip \
module.json \
README.md \
LICENSE \
templates \
dist/ \
styles/ \
languages/
- name: Update Release With Files
id: create_version_release
uses: ncipollo/[email protected]
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, ./LICENSE, ./README.md'
tag: ${{ env.TAG }}
body: ${{ github.event.release.body }}
- name: Update Foundry VTT Module Repo
run: |
pip install markdown-it-py --quiet
PREV_TAG=$(git describe --tags --abbrev=0 ${{ env.TAG }}^)
export FILES_CHANGED=$(git diff --name-only "$PREV_TAG" "${{ env.TAG }}")
export CHANGES=$(git log --pretty=format:%s "$PREV_TAG".."${{ env.TAG }}")
python .github/workflows/foundry_release.py
env:
FOUNDRY_PACKAGE_RELEASE_TOKEN: ${{ secrets.FOUNDRY_PACKAGE_RELEASE_TOKEN }}
FOUNDRY_USERNAME: ${{ secrets.FOUNDRY_USERNAME }}
FOUNDRY_PASSWORD: ${{ secrets.FOUNDRY_PASSWORD }}
FOUNDRY_AUTHOR: ${{ secrets.FOUNDRY_AUTHOR }}
UPDATE_DISCORD_KEY: ${{ secrets.UPDATE_DISCORD_KEY }}