-
Notifications
You must be signed in to change notification settings - Fork 20
173 lines (171 loc) · 6.37 KB
/
release.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
166
167
168
169
170
171
172
173
name: Release CI
on:
release:
types: [published]
workflow_dispatch:
jobs:
linuxbuild:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java Zulu 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Extract Version
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'
- name: Set Version Release
run: |
mvn -B versions:set -DnewVersion="${{steps.version.outputs.full_without_prefix}}"
echo -n "${{steps.version.outputs.full_without_prefix}}" > ./core/src/main/resources/org/correomqtt/core/utils/version.txt
if: steps.version.outputs.is_valid == 'true'
shell: bash
- name: Build
run: |
mvn -B clean install -DskipTests=true
shell: bash
- name: Install rpm
run: sudo apt-get install -y rpm
- name: Package DEB
run: |
jpackage \
--type deb \
-d dist \
-i target \
-n CorreoMQTT \
--main-jar correomqtt-${{steps.version.outputs.full_without_prefix}}.jar \
--app-version ${{steps.version.outputs.major_without_prefix}}.${{steps.version.outputs.minor}}.${{steps.version.outputs.patch}}-${{steps.version.outputs.prerelease}} \
--icon ./gui/src/main/deploy/package/Icon.png \
--linux-package-deps libpng16-16 \
--resource-dir .github/resources/linux
- name: Package RPM
run: |
jpackage \
--type rpm \
-d dist \
-i target \
-n CorreoMQTT \
--main-jar correomqtt-${{steps.version.outputs.full_without_prefix}}.jar \
--app-version ${{steps.version.outputs.major_without_prefix}}.${{steps.version.outputs.minor}}.${{steps.version.outputs.patch}}+${{steps.version.outputs.prerelease}} \
--icon ./gui/src/main/deploy/package/Icon.png \
--resource-dir .github/resources/linux
- name: Release
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
file: dist/*.deb;dist/*.rpm;target/*.jar;target/*.json
tags: true
winbuild:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java Zulu 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Extract Version
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'
- name: Set Version Release
run: |
mvn -B versions:set -DnewVersion="${{steps.version.outputs.full_without_prefix}}"
echo -n "${{steps.version.outputs.full_without_prefix}}" > ./core/src/main/resources/org/correomqtt/core/utils/version.txt
if: steps.version.outputs.is_valid == 'true'
shell: bash
- name: Build
run: |
mvn -B clean install -DskipTests=true
shell: bash
- name: Package MSI
shell: bash
run: |
jpackage \
--type msi \
-d dist \
-i target \
-n CorreoMQTT \
--main-jar correomqtt-${{steps.version.outputs.full_without_prefix}}.jar \
--app-version ${{steps.version.outputs.major_without_prefix}}.${{steps.version.outputs.minor}}.${{steps.version.outputs.patch}} \
--icon ./gui/src/main/deploy/package/Icon.ico \
--win-dir-chooser \
--win-menu \
--win-menu-group CorreoMqtt \
--win-shortcut \
--vendor "Exxeta AG" \
--win-upgrade-uuid "146a4ea7-af22-4e1e-a9ea-7945ce0190fd"
- name: Release
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
file: dist/*.msi
tags: true
macbuild:
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java Zulu 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Extract Version
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'
- name: Set Version Release
run: |
mvn -B versions:set -DnewVersion="${{steps.version.outputs.full_without_prefix}}"
echo -n "${{steps.version.outputs.full_without_prefix}}" > ./core/src/main/resources/org/correomqtt/core/utils/version.txt
if: steps.version.outputs.is_valid == 'true'
shell: bash
- name: Build
run: |
mvn -B clean install -DskipTests=true
shell: bash
- name: Package DMG
run: |
jpackage \
--type app-image \
-d dist \
-i target \
-n CorreoMQTT \
--main-jar correomqtt-${{steps.version.outputs.full_without_prefix}}.jar \
--app-version 1.${{steps.version.outputs.minor}}.${{steps.version.outputs.patch}} \
--icon ./gui/src/main/deploy/package/Icon.icns
openssl req -subj '/CN=correomqtt.org' -config .github/osx.correo.certconfig -x509 -newkey rsa:4096 -keyout correokey.pem -out correocert.pem -days 365 -nodes
openssl pkcs12 -passout pass:1234 -export -out correomqtt.p12 -inkey correokey.pem -in correocert.pem
security create-keychain -p 1234 /tmp/correomqtt-db
security import correomqtt.p12 -k /tmp/correomqtt-db -P 1234 -T /usr/bin/codesign
security default-keychain -d user -s /tmp/correomqtt-db
security unlock-keychain -p 1234 /tmp/correomqtt-db
security list-keychains -s /tmp/correomqtt-db
codesign -h -fs correomqtt.org --keychain /tmp/correomqtt-db --force target/CorreoMQTT.app
jpackage \
--type dmg \
-d target \
-n CorreoMQTT \
--app-version ${{steps.version.outputs.full_without_prefix}} \
--app-image target/CorreoMQTT.app
- name: Release
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: false
file: dist/*.dmg
tags: true