From 3a6b656f027e75a2760901d6011c8a9c3a3fb7db Mon Sep 17 00:00:00 2001 From: jalensailin Date: Sat, 28 Oct 2023 23:42:46 -0400 Subject: [PATCH] Update github workflow to automate version/links; Update system.json with dummy values; These'll be replaced with correct values by the build system on release --- .github/workflows/buildPacks.yml | 21 +++++++++++++++++---- system.json | 6 +++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/buildPacks.yml b/.github/workflows/buildPacks.yml index 3a385c0..584a153 100644 --- a/.github/workflows/buildPacks.yml +++ b/.github/workflows/buildPacks.yml @@ -37,11 +37,24 @@ jobs: - run: fvtt package pack "operation-code-name-generator" --in "packs/source/operation-code-name-generator" --out "packs" - run: fvtt package pack "operation-code-name-generator-macro" --in "packs/source/operation-code-name-generator-macro" --out "packs" - run: fvtt package pack "pregens" --in "packs/source/pregens" --out "packs" - # 12. Zip up the branch with the LevelDB packs. + # 12. Get the version number without the leading -v. + - name: Get Version + id: get_version + uses: dhkatz/get-version-action@v3.0.0 + # 13. Substitute the Manifest and Download URLs in the system.json + - name: Substitute Manifest, Download Links For Versioned Ones + uses: TomaszKandula/variable-substitution@v1.0.1 + with: + files: "system.json" + env: + version: ${{steps.get_version.outputs.version-without-v}} + manifest: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/system.json + download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/deltagreen.zip + # 14. Zip up the branch with the LevelDB packs. - name: Zip # Exclude the source json files from the final package, as well as any git folders. - run: zip -r deltagreen.zip . --exclude="*packs/source/*" --exclude="*.git*" - # 13. Updates the release with the newly zipped branch. See documentation of this action for details. + run: zip -r deltagreen.zip . --exclude="*packs/source/*" --exclude=".*" --exclude="package-lock.json" --exclude="package.json" + # 15. Updates the release with the newly zipped branch. See documentation of this action for details. - name: Update Release with Artifacts uses: ncipollo/release-action@v1.13.0 with: @@ -49,5 +62,5 @@ jobs: name: ${{ github.event.release.name }} tag: ${{ github.event.release.tag_name }} body: ${{ github.event.release.body }} - artifacts: "./deltagreen.zip" + artifacts: "./deltagreen.zip, ./system.json" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/system.json b/system.json index 1313d21..5ef8703 100644 --- a/system.json +++ b/system.json @@ -15,7 +15,7 @@ "discord": "jalensailin" } ], - "version": "1.3.3", + "version": "DUMMY_VALUE", "compatibility": { "minimum": "11", "verified": "11" @@ -128,8 +128,8 @@ } } ], - "manifest": "https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial/raw/master/system.json", - "download": "https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial/releases/download/v1.3.3/deltagreen.zip", + "manifest": "DUMMY_VALUE", + "download": "DUMMY_VALUE", "gridDistance": 1, "gridUnits": "m", "primaryTokenAttribute": "health",