-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (67 loc) · 2.41 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
64
65
66
67
68
69
70
71
name: Create new Release
on:
push:
branches:
- main
env:
ZIP_FILENAME: "pf2e-es"
PACKAGE_CONTENT: "module.json src/babele-register.js src/translator/ lang/ translation/ styles/"
jobs:
versioning:
runs-on: ubuntu-latest
outputs:
tag: ${{steps.changelog.outputs.tag}}
skipped: ${{steps.changelog.outputs.skipped}}
changelog: ${{steps.changelog.outputs.changelog}}
steps:
- uses: actions/checkout@v2
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
skip-on-empty: false
version-file: "module.json"
build:
runs-on: ubuntu-latest
needs: versioning
steps:
- uses: actions/checkout@v2
with:
ref: ${{ needs.versioning.outputs.tag }}
# Create a zip file with all files required by the module to add to the release
- name: Create Artifact
if: ${{ needs.versioning.outputs.skipped == 'false' }}
id: build-zip
run: zip -r $ZIP_FILENAME.zip $PACKAGE_CONTENT
# Create a release for this specific version
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
if: ${{ needs.versioning.outputs.skipped == 'false' }}
with:
allowUpdates: true
name: ${{needs.versioning.outputs.tag}}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "./module.json, ./${{env.ZIP_FILENAME}}.zip"
tag: ${{ needs.versioning.outputs.tag }}
body: ${{ needs.versioning.outputs.changelog }}
publish:
runs-on: ubuntu-latest
needs: [versioning, build]
steps:
- name: Publish to Foundry VTT Repo
id: publish_foundry_repo
if: ${{ needs.versioning.outputs.skipped == 'false' }}
run: npx @ghost-fvtt/foundry-publish
env:
FVTT_MANIFEST_URL: 'https://github.com/allnnde/pf2e-esp-translation/releases/latest/download/module.json'
FVTT_PACKAGE_ID: ${{ secrets.FVTT_PACKAGE_ID }}
FVTT_USERNAME: ${{ secrets.FVTT_USERNAME }}
FVTT_PASSWORD: ${{ secrets.FVTT_PASSWORD }}
FVTT_MINIMUM_CORE_VERSION: 11
FVTT_PACKAGE_VERSION: ${{ needs.versioning.outputs.tag }}
FVTT_VERIFIED_CORE_VERSION: 11
FVTT_COMPATIBLE_CORE_VERSION: 11