From 31250f54365cebb7c01ef8569cc2c6bc0344c583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?YanK=20l=27Innomm=C3=A9?= Date: Wed, 19 Jun 2024 15:55:23 +0200 Subject: [PATCH] Update GitHub Actions workflow to create module files for GitHub release --- .github/workflows/main.yaml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 996035b..5f5ac29 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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: @@ -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.