v11 test build #29
Workflow file for this run
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
# Thanks to Calego / ElfFriend (https://github.com/ElfFriend-DnD/) for the initial reference for this GH Action. | |
name: Module Tag / Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
environment: default | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "14.x" | |
- name: Install Dependencies | |
run: | | |
npm install -g yarn | |
yarn install | |
- name: Get Release Version From Tag | |
id: get_version | |
uses: battila7/get-version-action@0db33b6cb875aa6bc761ca535b74aef8925a6f0c | |
- name: Prepare Module Manifest | |
id: sub_manifest_link_version | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: 'module.json' | |
env: | |
version: ${{steps.get_version.outputs.version-without-v}} | |
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json | |
download: https://github.com/${{github.repository}}/releases/download/${{steps.get_version.outputs.version}}/module.zip | |
- name: Build Release | |
run: | | |
set -euo pipefail | |
npm run-script build | |
npm run-script package | |
# Generate changelog for release body | |
- name: Generate Changelog | |
uses: scottbrenner/generate-changelog-action@f17b985298496cf8df35aa1104091c51e7bfea95 | |
env: | |
REPO: ${{ github.repository }} | |
# Create a release for this specific version | |
- name: Create Release | |
uses: ncipollo/release-action@238505795d6d58d49b78980f271f70dfcd8efb35 | |
with: | |
allowUpdates: true | |
name: ${{ env.RELEASE_VERSION }} | |
body: | | |
${{ steps.Changelog.outputs.changelog }} | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './module.json,./package/module.zip' | |
tag: ${{ env.RELEASE_VERSION }} | |
# Publish the release to FoundryVTT's package repository. | |
#- name: FoundryVTT AutoPublish | |
# uses: Varriount/[email protected] | |
# with: | |
# username: ${{ secrets.FOUNDRY_ADMIN_USER }} | |
# password: ${{ secrets.FOUNDRY_ADMIN_PW }} | |
# module-id: 288 | |
# manifest-url: https://github.com/${{ github.repository }}/releases/download/${{ env.RELEASE_VERSION }}/module.json | |
# manifest-file: ./module.json |