-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (63 loc) · 2.04 KB
/
build.yaml
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
73
74
75
76
77
78
79
80
81
82
name: Build
on:
workflow_dispatch:
push:
branches: [main]
env:
PYTHON_VERSION: "3.12"
POETRY_VERSION: "1.8.3"
MOD_VERSION: "x.x.x"
MOD_BUILD_STAGE: "prod"
permissions:
contents: read
jobs:
build-base:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Poetry ${{env.POETRY_VERSION}}
run: pipx install poetry==${{env.POETRY_VERSION}}
- name: Setup Python ${{env.PYTHON_VERSION}}
uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
cache: "poetry"
- name: Install dependencies
run: poetry install --only main
- name: Build base content pack
run: poetry run python3 src/main.py
- name: Get metadata
run: |
echo "MOD_VERSION=$(cat out/LATEST)" >> $GITHUB_ENV
- name: Save base content pack
uses: actions/upload-artifact@v4
with:
name: orientalmelon.baechusportraits-${{ env.MOD_VERSION }}-base
path: out/orientalmelon.baechusportraits-*-base
if-no-files-found: error
build-sve:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Poetry ${{env.POETRY_VERSION}}
run: pipx install poetry==${{env.POETRY_VERSION}}
- name: Setup Python ${{env.PYTHON_VERSION}}
uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
cache: "poetry"
- name: Install dependencies
run: poetry install --only main
- name: Build SVE content pack
run: poetry run python3 src/main.py -e SVE
- name: Get metadata
run: |
echo "MOD_VERSION=$(cat out/LATEST)" >> $GITHUB_ENV
- name: Save SVE content pack
uses: actions/upload-artifact@v4
with:
name: orientalmelon.baechusportraits-${{ env.MOD_VERSION }}-base-sve
path: out/orientalmelon.baechusportraits-*-base-sve
if-no-files-found: error