-
Notifications
You must be signed in to change notification settings - Fork 105
165 lines (137 loc) · 5.11 KB
/
package.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Build
on:
push:
branches: [ master, release-3.7 ]
pull_request:
branches: [ master, release-3.7 ]
jobs:
package:
name: Test & Package
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set branch
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-3.7'
# Checking out a detached head for PR means we have to set the branch
# name for it to show up later; shallow checkout means the branch
# won't exist yet so there's no conflict.
run: git checkout -b ${GITHUB_HEAD_REF}
- name: Store version
id: version
run: echo "VERSION=$(make version-print)" >> $GITHUB_OUTPUT
- name: Update container
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install dos2unix genisoimage ghostscript nsis
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 23
java-package: jdk
- name: Cache Maven packages
uses: actions/cache@v4
id: cache-maven
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Cache packaging dependencies
id: cache-bootstrap
uses: actions/cache@v4
with:
path: |
./dist/dmg
./dist/jdks
./dist/launch4j
./dist/lipo
key: ${{ runner.os }}-bootstrap-${{ hashFiles('bootstrap.sh') }}
- name: Install packaging dependencies
if: steps.cache-bootstrap.outputs.cache-hit != 'true'
run: ./bootstrap.sh
- name: Build packages
run: make release
- name: Archive Linux
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-linux.tar.bz2
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-linux.tar.bz2
- name: Archive MacOS
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-macos-universal.dmg
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-macos-universal.dmg
- name: Archive other
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
- name: Archive Windows x86_64
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe
- name: Archive Windows aarch64
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
package_win_x86_32:
name: Test & Package Windows x86_32
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set branch
if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release-3.7'
# Checking out a detached head for PR means we have to set the branch
# name for it to show up later; shallow checkout means the branch
# won't exist yet so there's no conflict.
run: git checkout -b ${GITHUB_HEAD_REF}
- name: Store version
id: version
run: echo "VERSION=$(make version-print)" >> $GITHUB_OUTPUT
- name: Update container
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install dos2unix genisoimage ghostscript nsis
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-package: jdk
- name: Cache Maven packages
uses: actions/cache@v4
id: cache-maven
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Cache packaging dependencies
id: cache-bootstrap
uses: actions/cache@v4
with:
path: |
./dist/dmg
./dist/jdks
./dist/launch4j
./dist/lipo
key: ${{ runner.os }}-bootstrap-${{ hashFiles('bootstrap.sh') }}
- name: Install packaging dependencies
if: steps.cache-bootstrap.outputs.cache-hit != 'true'
run: ./bootstrap.sh
- name: Build Windows x86_32
run: make release-windows-x86_32
- name: Archive Windows x86_32
uses: actions/upload-artifact@v4
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe