forked from jonaseberle/autoortho-scenery
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 1.95 KB
/
push-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
73
74
75
76
77
78
79
80
name: Build tileset (and upload)
on:
workflow_dispatch:
inputs:
tileset:
type: choice
options:
- asi
- afr
- sa
- na
- aus_pac
- eur
- test
zl:
type: string
default: 16
relname:
type: string
default: ''
jobs:
ziplist:
runs-on: ubuntu-22.04
env:
DEBIAN_FRONTEND: noninteractive
TZ: America/NewYork
GH_TOKEN: ${{ github.token }}
outputs:
chunks: ${{ steps.chunks.outputs.chunks }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Gen tile sub-lists
id: chunks
run: |
TILENAME=${{ inputs.tileset }} make -f Makefile.tiles ${{ inputs.tileset }}_tile_list_chunks
CHUNKS=$(ls ${{ inputs.tileset }}_tile_list.* | awk -F '.' '/.+/ { printf "%s\"z_${{ inputs.tileset }}_%s.zip\"", sep, ""$2""; sep=", " }')
#CHUNKS=$(ls ${{ inputs.tileset }}_tile_list.* | awk -v ORS=',' '{print $1}')
echo "chunks={\"chunk\":[$CHUNKS]}" >> $GITHUB_OUTPUT
call-build:
needs: ziplist
strategy:
matrix: ${{ fromJSON(needs.ziplist.outputs.chunks) }}
# might still need several restarts of failed jobs, but prevents us from losing successful work
fail-fast: false
uses: ./.github/workflows/build-tiles.yml
with:
zip: ${{ matrix.chunk }}
setname: ${{ inputs.tileset }}
relname: ${{ inputs.relname }}
info:
#if: startsWith(github.ref, 'refs/tags/')
needs: call-build
environment: release
runs-on: ubuntu-22.04
env:
DEBIAN_FRONTEND: noninteractive
TZ: America/NewYork
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ inputs.tileset }}_info.json
tag_name: ${{ inputs.relname }}