forked from vassalengine/vassal
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (91 loc) · 3.5 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
name: Build
on:
push:
branches: [ master, release-3.6 ]
pull_request:
branches: [ master, release-3.6 ]
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.6'
# 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@v3
with:
distribution: 'temurin'
java-version: 20
java-package: jdk
- name: Cache Maven packages
uses: actions/cache@v3
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@v3
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@v3
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@v3
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@v3
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-other.zip
- name: Archive Windows x86_32
uses: actions/upload-artifact@v3
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-x86_32.exe
- name: Archive Windows x86_64
uses: actions/upload-artifact@v3
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@v3
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}-windows-aarch64.exe
- name: Archive SHA256 hashes
uses: actions/upload-artifact@v3
with:
name: VASSAL-${{ steps.version.outputs.VERSION }}.sha256
path: tmp/VASSAL-${{ steps.version.outputs.VERSION }}.sha256