-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (109 loc) · 4.93 KB
/
build-jpackage.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
name: Build Installers & Upload To Release
on:
release:
types: [ created ]
jobs:
build-linux-installer:
name: Build Installer on Linux
runs-on: ubuntu-latest
permissions: write-all
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v3
with:
ref: develop
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: |
mvn clean package
jpackage --input target/ --dest target/ --name Yatran --app-version ${{ github.event.release.tag_name }} --description 'Typing tutor for children that allows improving typing words speed in a fun way' --icon src/main/resources/images/icon.png --main-jar Yatran-1.0.0-jar-with-dependencies.jar --main-class ua.com.yatran.Yatran --type deb --linux-shortcut --linux-app-release ${{ github.event.release.tag_name }} --linux-deb-maintainer 'Illia Zhuravskyi <[email protected]>' --linux-menu-group Yatran
ls -as target
mv target/yatran_${{ github.event.release.tag_name }}-${{ github.event.release.tag_name }}_amd64.deb target/Yatran-${{ github.event.release.tag_name }}-Debian_amd64.deb
# UPLOAD INSTALLER
- id: upload-linux-installer
name: Upload Linux installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/Yatran-${{ github.event.release.tag_name }}-Debian_amd64.deb
asset_name: Yatran-${{ github.event.release.tag_name }}-Debian_amd64.deb
asset_content_type: application/x-binary
build-windows-installer:
name: Build Installer on Windows
runs-on: windows-latest
permissions: write-all
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v3
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: |
mvn clean package
jpackage --input target/ --dest target/ --name Yatran --app-version ${{ github.event.release.tag_name }} --description 'Typing tutor for children that allows improving typing words speed in a fun way' --icon src/main/resources/images/icon.ico --main-jar Yatran-1.0.0-jar-with-dependencies.jar --main-class ua.com.yatran.Yatran --type msi --win-dir-chooser --win-menu --win-per-user-install --win-shortcut --win-menu-group Yatran
ls -as target
mv target/Yatran-${{ github.event.release.tag_name }}.msi target/Yatran-${{ github.event.release.tag_name }}-Windows.msi
# UPLOAD INSTALLER
- id: upload-windows-installer
name: Upload Windows installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/Yatran-${{ github.event.release.tag_name }}-Windows.msi
asset_name: Yatran-${{ github.event.release.tag_name }}-Windows.msi
asset_content_type: application/x-binary
build-macos-installer:
name: Build Installer on MacOS
runs-on: macos-latest
permissions: write-all
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v3
- id: setup-jdk
name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
# BUILD FOR DISTRIBUTION
- id: build
name: Build distribution
run: |
mvn clean package
jpackage --input target/ --dest target/ --name Yatran --app-version ${{ github.event.release.tag_name }} --description 'Typing tutor for children that allows improving typing words speed in a fun way' --icon src/main/resources/images/icon.icns --main-jar Yatran-1.0.0-jar-with-dependencies.jar --main-class ua.com.yatran.Yatran --type pkg
ls -as target
mv target/Yatran-${{ github.event.release.tag_name }}.pkg target/Yatran-${{ github.event.release.tag_name }}-macOS.pkg
# UPLOAD INSTALLER
- id: upload-macos-installer
name: Upload MacOS installer
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/Yatran-${{ github.event.release.tag_name }}-macOS.pkg
asset_name: Yatran-${{ github.event.release.tag_name }}-macOS.pkg
asset_content_type: application/x-binary