forked from Jagusti/fvtt-wfrp4e-gmtoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.34 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Get Foundry CLI
- name: Install FVTT CLI
uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm i -g @foundryvtt/foundryvtt-cli
# Seutup python and compile compendium packs
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- run: python pack_util.py pack
# Get Module ID
- name: Get Module ID
id: moduleID
uses: notiz-dev/github-action-json-property@release
with:
path: 'module.json'
prop_path: 'id'
# Substitute the Manifest and Download URLs in the manifest file
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: "module.json"
env:
version: ${{github.event.release.tag_name}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/${{steps.moduleID.outputs.prop}}.zip
# Create a zip file with all files required by the system to add to the release
- run: zip -r ./${{steps.moduleID.outputs.prop}}.zip apps/ assets/ css/ lang/ modules/ packs/ scripts/ tables/ templates/ CHANGELOG.md LICENSE README.md module.json ${{steps.moduleID.outputs.prop}}.mjs
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/[email protected]
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
# draft: ${{ github.event.release.unpublished }}
# prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "./module.json, ./${{steps.moduleID.outputs.prop}}.zip"
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
generateReleaseNotes: true
discussionCategory: "Announcements"