-
Notifications
You must be signed in to change notification settings - Fork 7
155 lines (128 loc) · 3.96 KB
/
build-installer.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
name: Installer build
on:
workflow_dispatch:
push:
tags:
- "v*"
# When setting the java version, always use x.y.z even if there's more numbers, otherwise @setup-java will fail.
jobs:
build-windows-installer-msi:
name: Build Windows installer (MSI)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK 21
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: .\gradlew.bat jpackage
- name: Sign
uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.CERTIFICATE }}'
files: |
./app/build/distributions/Xeres-*.msi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ./app/build/distributions/Xeres-*.msi
name: windows-installer-msi
retention-days: 1
build-windows-installer-portable:
name: Build Windows installer (Portable)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK 21
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: .\gradlew.bat jpackage -P"jpackage.portable=true"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ./app/build/distributions/Xeres-*.zip
name: windows-installer-portable
retention-days: 1
build-linux-installer-deb:
name: Build Linux installer (DEB)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle
uses: gradle/actions/wrapper-validation@v4
- name: Setup JDK 21
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: ./gradlew jpackage
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ./app/build/distributions/xeres_*.deb
name: linux-installer-deb
retention-days: 1
create-release:
name: Create release
runs-on: ubuntu-latest
needs: [ build-windows-installer-msi, build-windows-installer-portable, build-linux-installer-deb ]
steps:
- name: Download Windows installer (MSI)
uses: actions/download-artifact@v4
with:
name: windows-installer-msi
- name: Download Windows installer (Portable)
uses: actions/download-artifact@v4
with:
name: windows-installer-portable
- name: Download Linux installer (DEB)
uses: actions/download-artifact@v4
with:
name: linux-installer-deb
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
*.exe
*.msi
*.deb
*.rpm
*.dmg
*.zip
- name: Create Github release
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: true
files: |
checksum.txt
*.exe
*.msi
*.deb
*.rpm
*.dmg
*.zip
# For manual builds, add automatic_release_tag: "Nightly" above