This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
v1.0.0-rc4 #4
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
# Based on the workflows of: | |
# https://github.com/League-of-Foundry-Developers/FoundryVTT-Module-Template and | |
# https://github.com/pwatson100/alienrpg | |
name: Release Creation | |
on: | |
release: | |
types: [published] | |
env: | |
# The URL used for the system'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 system 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/scorn.json" | |
# The URL to the system archive associated with the system release being | |
# processed by this workflow. | |
release_system_url: "https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/scorn.zip" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# 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 system manifest. | |
- name: Extract Version From Tag | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Modify System Manifest With Release-Specific Values | |
id: sub_manifest_link_version | |
uses: cschleiden/replace-tokens@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_system_url }} | |
# Create a zip file with all files required by the system to add to the release | |
- run: zip -r ./scorn.zip README.md LICENSE-MIT LICENSE-AGPL README.md system.json template.json css/ fonts/ lang/ module/ packs/ templates/ | |
# 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, ./scorn.zip" | |
tag: ${{ github.event.release.tag_name }} | |
body: ${{ github.event.release.body }} |