Skip to content

Commit

Permalink
Update GitHub Actions workflow to create module files for GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
YanKlInnomme committed Jun 19, 2024
1 parent a9cdc1b commit 31250f5
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
name: Create Module Files For GitHub Release


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:
# Only run this workflow when a release is published.
# To modify this workflow when other events occur, see:
Expand Down Expand Up @@ -61,14 +45,14 @@ jobs:
# commited to the repository, and only exist in the action's filesystem.
- name: Modify Module Manifest With Release-Specific Values
id: sub_manifest_link_version
uses: cschleiden/replace-tokens@v1
uses: microsoft/variable-substitution@v1
with:
files: 'module.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: ${{ env.project_url }}
manifest: ${{ env.latest_manifest_url }}
download: ${{ env.release_module_url }}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip


# Create a "module.zip" archive containing all the module's required files.
Expand Down

0 comments on commit 31250f5

Please sign in to comment.