0.0.14 #27
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: Module Builder | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' # Specify the Node.js version you need | |
- name: Install NPM dependencies | |
run: npm install | |
- name: Zip Files | |
working-directory: ./ | |
run: zip -r ./module.zip ./* | |
- name: Get Version | |
shell: bash | |
id: get-version | |
run: echo "version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT | |
- name: Set Output for Release Notes | |
id: input-release-notes | |
run: echo "::set-output name=RELEASE_NOTES::${RELEASE_NOTES}" | |
- name: Input Release Notes | |
run: | | |
echo "These are release notes for version x" | |
read RELEASE_NOTES | |
env: | |
RELEASE_NOTES: ${{ steps.input-release-notes.outputs.RELEASE_NOTES }} | |
- name: Create Release | |
id: create-release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: Release ${{ steps.get-version.outputs.version }} | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './module.zip, ./module.json' | |
tag: ${{ steps.get-version.outputs.version }} | |
bodyFile: ${{ steps.input-release-notes.outputs.RELEASE_NOTES }} | |
- name: Foundry Release | |
id: foundry-release | |
run: node ./update-foundry-package.js | |
env: | |
FOUNDRY_API_TOKEN: ${{ secrets.FOUNDRY_API_TOKEN }} | |
PACKAGE_ID: 'gambits-premades' | |
PACKAGE_VERSION: '${{ steps.get-version.outputs.version }}' | |
MANIFEST_URL: 'https://github.com/gambit07/gambits-premades/releases/download/${{ steps.get-version.outputs.version }}/module.json' | |
RELEASE_NOTES_URL: 'https://github.com/gambit07/gambits-premades/releases/tag/${{ steps.get-version.outputs.version }}' | |
FOUNDRY_MIN_VERSION: '11' | |
FOUNDRY_VERIFIED_VERSION: '11' | |
FOUNDRY_MAX_VERSION: '11' |