-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.31 KB
/
build.yml
File metadata and controls
51 lines (44 loc) · 1.31 KB
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
name: Build
on:
workflow_call:
workflow_dispatch:
jobs:
build:
name: Generate definitions
strategy:
matrix:
ref:
- develop
- 50.*
- 0.47.*
- adv-beta
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: true
- name: Checkout DFHack reference
id: checkout-ref
run: |
REF=$(git ls-remote --exit-code origin '${{ matrix.ref }}' | grep -vF '^{}' | tail -n 1)
read SHA NAME <<< $REF
git fetch --depth=1 origin $SHA
git checkout $SHA
echo "name=$(echo $NAME | sed -e 's/refs\/tags\///g' -e 's/refs\/heads\///g')" > $GITHUB_OUTPUT
working-directory: dfhack
- name: Sync library/xml
run: |
git config -f .gitmodules submodule.library/xml.shallow true
git submodule update --init --single-branch library/xml
working-directory: dfhack
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Generate definitions
run: bundle exec rake build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dfhack-lua-definitions-${{ steps.checkout-ref.outputs.name }}
path: dist