-
Notifications
You must be signed in to change notification settings - Fork 0
176 lines (158 loc) · 4.61 KB
/
Copy pathjpackage.yml
File metadata and controls
176 lines (158 loc) · 4.61 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
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
166
167
168
169
170
171
172
173
174
175
176
name: Package JGAAP
on:
push:
branches: [ "gradle" ]
pull_request:
types:
- closed
jobs:
build-windows-installer:
name: Build Installer on Windows
runs-on: windows-latest
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v4
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'openjdk'
java-version: 21
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: ./gradlew jpackage
# SAVE INSTALLER
- id: upload-installer
name: Upload installer
uses: actions/upload-artifact@v4
with:
path: ./jgaap/build/jpackage/JGAAP-x86_64-9.0.0.msi
name: windows-installer
retention-days: 1
build-macos-intel-installer:
name: Build Installer on macOS intel
runs-on: macos-13
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v4
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'openjdk'
java-version: 21
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: ./gradlew jpackage
# SAVE INSTALLER
- id: upload-installer
name: Upload installer
uses: actions/upload-artifact@v4
with:
path: ./jgaap/build/jpackage/JGAAP-x86_64-9.0.0.dmg
name: macOS-dmg-Intel
retention-days: 1
build-macos-AS-installer:
name: Build Installer on macOS ARM
runs-on: macos-latest
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v4
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'openjdk'
java-version: 21
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: ./gradlew jpackage
# SAVE INSTALLER
- id: upload-installer
name: Upload installer
uses: actions/upload-artifact@v4
with:
path: ./jgaap/build/jpackage/JGAAP-aarch64-9.0.0.dmg
name: macOS-dmg-AS
retention-days: 1
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: [build-windows-installer, build-macos-AS-installer, build-macos-intel-installer]
steps:
# DOWNLOAD INSTALLERS
- id: download-macos-intel-installer
name: Download Linux installer
uses: actions/download-artifact@v4
with:
name: macOS-dmg-Intel
- id: download-macos-arm-installer
name: Download Linux installer
uses: actions/download-artifact@v4
with:
name: macOS-dmg-AS
- id: download-windows-installer
name: Download Windows installer
uses: actions/download-artifact@v4
with:
name: windows-installer
# CREATE GITHUB RELEASE AND ADD ASSETS
- id: tag
name: Move example-release tag
shell: bash
if: false
run: |
# Move tag
git tag -d example-release
git push --delete origin example-release
git tag -a example-release -m "Example of a Release"
git push --follow-tags
- id: create-release
name: Create GitHub release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: example-release
release_name: example-release
draft: false
prerelease: false
- id: release-macOS-Intel
name: Release macOS Intel installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: JGAAP-x86_64-9.0.0.dmg
asset_name: JGAAP-x86_64-9.0.0.dmg
asset_content_type: application/x-binary
- id: release-macOS-AS
name: Release macOS AS installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: JGAAP-aarch64-9.0.0.dmg
asset_name: JGAAP-aarch64-9.0.0.dmg
asset_content_type: application/x-binary
- id: release-windows-installer
name: Release Windows installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: JGAAP-x86_64-9.0.0.msi
asset_name: JGAAP-x86_64-9.0.0.msi
asset_content_type: application/x-binary