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
This commit is contained in:
jalensailin
2023-10-28 23:45:08 -04:00
parent 9e2e06c60e
commit 3a6b656f02
2 changed files with 20 additions and 7 deletions
+17 -4
View File
@@ -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 }}