Skip to content

Cthulhu Deep Green v1.0.3 #20

Cthulhu Deep Green v1.0.3

Cthulhu Deep Green v1.0.3 #20

Workflow file for this run

# Based on the workflows of:
# https://github.com/League-of-Foundry-Developers/FoundryVTT-Module-Template and
# https://github.com/pwatson100/alienrpg
name: Release Creation
env:
# The URL used for the module's "Project URL" link on FoundryVTT's website.
project_url: "https://github.com/${{github.repository}}"
# A URL that will always point to the latest manifest.
# FoundryVTT uses this URL to check whether the current module version that
# is installed is the latest version. This URL should NOT change,
# otherwise FoundryVTT won't be able to perform this check.
latest_manifest_url: "https://github.com/${{github.repository}}/releases/latest/download/module.json"
# The URL to the module archive associated with the module release being
# processed by this workflow.
release_module_url: "https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip"
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# Extract version embedded in the tag.
# This step expects the tag to be one of the following formats:
# - "v<major>.<minor>.<patch>" (e.g., "v1.2.3")
# - "<major>.<minor>.<patch>" (e.g., "1.2.3")
#
# The version will be used by later steps to fill in the value for the
# "version" key required for a valid module manifest.
- name: Extract Version From Tag
id: get_version
uses: battila7/get-version-action@v2
#Substitute the Manifest and Download URLs in the system.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_release_manifest_version
uses: microsoft/variable-substitution@v1
with:
files: "system.json"
env:
VERSION: ${{steps.get_version.outputs.version-without-v}}
URL: ${{ env.project_url }}
MANIFEST: ${{ env.latest_manifest_url }}
DOWNLOAD: ${{ env.release_module_url }}
# create a zip file with all files required by the module to add to the release
- run: zip -r ./system.zip system.json template.json README.md LICENSE templates/ module/ lang/ css/ assets/
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "./system.json, ./system.zip"
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}