-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (60 loc) · 2.2 KB
/
main.yml
File metadata and controls
67 lines (60 loc) · 2.2 KB
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
64
65
66
67
name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
# Substitute the Manifest and Download URLs in the system.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'system.json'
env:
version: ${{github.event.release.tag_name}}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/system.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/torgeternity.zip
changelog: https://github.com/${{github.repository}}/releases/tag/${{github.event.release.tag_name}}
# compile packs
- name: compile packs
run: npm ci
- run: npm run build
# Create a zip file with all files required by the system to add to the release
- run: |
zip -r ./torgeternity.zip \
css/ \
dice-models/ \
fonts/ \
images/ \
lang/ \
module/ \
packs/ \
templates/ \
Changelog.md \
LICENSE \
system.json
# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system.json, ./torgeternity.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
# Update foundryvtt.com with the new release details
- name: Deploy Release
run: npx @ghost-fvtt/foundry-publish
env:
FVTT_TOKEN: ${{ secrets.FOUNDRY_KEY }}
FVTT_MANIFEST_PATH: ./system.json