-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.6 KB
/
release.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
on:
push:
branches: ["master"]
paths: ["cases.json", "lines.json", "soundtags.json", "scripts/package.py"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Previous Tag
id: previoustag
uses: tdemin/[email protected]
with:
repo: https://github.com/glacier-modding/Hitman-l10n-Hashes
- name: Get New Tag
id: newtag
env:
curVer: ${{ steps.previoustag.outputs.tag }}
run: |
echo "tag=v$((${curVer#*v} + 1))" >> $GITHUB_OUTPUT
echo "numTag=$((${curVer#*v} + 1))" >> $GITHUB_OUTPUT
- name: Create Version JSON
run: echo "{\"version\":${{ steps.newtag.outputs.numTag }}}" > version.json
- name: Install Dependencies
run: pip install -r scripts/requirements.txt
- name: Package Hash Lists
run: python scripts/package.py ${{ steps.newtag.outputs.numTag }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
tag_name: ${{ steps.newtag.outputs.tag }}
name: ${{ steps.newtag.outputs.tag }}
files: |
hash_list.hmla
version.json
- name: Update README
run: python scripts/statistics.py
- name: Update Statistics
uses: EndBug/add-and-commit@v9
with:
add: |
README.md
default_author: github_actions
message: "chore: update statistics"