-
Notifications
You must be signed in to change notification settings - Fork 18
53 lines (45 loc) · 1.5 KB
/
build-mod.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
name: build-mod
on:
workflow_dispatch:
release:
types: [created]
pull_request:
permissions: read-all
jobs:
build-the-mod:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v4
- name: Download TTSModManager
run: wget https://github.com/argonui/TTSModManager/releases/download/v1.3/TTSModManager-Linux
shell: bash
- name: Make TTSModManager executable
run: chmod +x TTSModManager-Linux
shell: bash
- name: Set dynamic filename
id: filename
run: |
if [ "${{ github.event_name }}" == "release" ]; then
stripped_name=$(echo "${{ github.event.release.tag_name }}" | sed -E 's/^[Vv]ersion[ ]*//')
echo "filename=Arkham SCE ${stripped_name}.json" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" == "pull_request" ]; then
echo "filename=${{ github.head_ref }}.json" >> $GITHUB_ENV
else
echo "filename=output.json" >> $GITHUB_ENV
fi
- name: Run TTSModManager
run: ./TTSModManager-Linux -moddir="./" -modfile="./${{ env.filename }}"
shell: bash
- name: Upload built mod
uses: actions/upload-artifact@v4
with:
name: TTSMod
path: ./${{ env.filename }}
- name: Add built mod to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.filename }}