-
Notifications
You must be signed in to change notification settings - Fork 18
72 lines (56 loc) · 1.56 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
72
name: build
on:
push:
branches:
- master
tags:
- "*"
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Install Lua
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "5.1"
- name: Install Luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Install and run Luacheck
uses: nebularg/actions-luacheck@v1
with:
files: .
args: "--no-color -q"
publish:
needs: check
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
steps:
- name: Clone project
uses: actions/checkout@v3
with:
fetch-depth: 100
- name: Fetch tags
run: git fetch --prune --unshallow --tags
- name: Generate Changelog
id: changelog
run: python changelog.py >> CHANGELOG.md
- name: Build ZIP
run: python build.py -r
- name: Create GitHub release
run: >
gh release create ${{github.ref_name}}
--verify-tag
-F CHANGELOG.md
releases/${{github.ref_name}}/ExtendedCharacterStats-${{github.ref_name}}.zip
releases/${{github.ref_name}}/release.json
- name: Upload CurseForge
run: sh upload-cf.sh ${{github.ref_name}}
- name: Upload WAGO
run: sh upload-wago.sh ${{github.ref_name}}