-
Notifications
You must be signed in to change notification settings - Fork 32
360 lines (360 loc) · 14.1 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
name: Release
on:
milestone:
types: [closed]
jobs:
debian-arm32v7:
name: Debian - arm32v7
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :debian-platforms:buildArm32v7DebianBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm32v7DebianBundle
path: debian-platforms/build/tmp/buildArm32v7DebianBundle/bundle/postgres-linux-debian.txz
debian-arm64v8:
name: Debian - arm64v8
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :debian-platforms:buildArm64v8DebianBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm64v8DebianBundle
path: debian-platforms/build/tmp/buildArm64v8DebianBundle/bundle/postgres-linux-debian.txz
debian-ppc64le:
name: Debian - ppc64le
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :debian-platforms:buildPpc64leDebianBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: ppc64leDebianBundle
path: debian-platforms/build/tmp/buildPpc64leDebianBundle/bundle/postgres-linux-debian.txz
alpine-arm32v6:
name: Alpine - arm32v6
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-platforms:buildArm32v6AlpineBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm32v6AlpineBundle
path: alpine-platforms/build/tmp/buildArm32v6AlpineBundle/bundle/postgres-linux-alpine_linux.txz
alpine-arm64v8:
name: Alpine - arm64v8
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-platforms:buildArm64v8AlpineBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm64v8AlpineBundle
path: alpine-platforms/build/tmp/buildArm64v8AlpineBundle/bundle/postgres-linux-alpine_linux.txz
alpine-ppc64le:
name: Alpine - ppc64le
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-platforms:buildPpc64leAlpineBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: ppc64leAlpineBundle
path: alpine-platforms/build/tmp/buildPpc64leAlpineBundle/bundle/postgres-linux-alpine_linux.txz
alpine-lite-arm32v6:
name: Alpine - arm32v6 (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-lite-platforms:buildArm32v6AlpineLiteBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm32v6AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm32v6AlpineLiteBundle/bundle/postgres-linux-alpine_linux.txz
alpine-lite-arm64v8:
name: Alpine - arm64v8 (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-lite-platforms:buildArm64v8AlpineLiteBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: arm64v8AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm64v8AlpineLiteBundle/bundle/postgres-linux-alpine_linux.txz
alpine-lite-ppc64le:
name: Alpine - ppc64le (Lite)
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Register QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Bundle
run: ./gradlew :alpine-lite-platforms:buildPpc64leAlpineLiteBundle -Pversion=$RELEASE_VERSION -PpgVersion=$POSTGRES_VERSION
- name: Upload bundle
uses: actions/upload-artifact@v2
with:
name: ppc64leAlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildPpc64leAlpineLiteBundle/bundle/postgres-linux-alpine_linux.txz
release:
name: Collect artifacts & Release ${{ github.event.milestone.title }}
needs: [debian-arm32v7, debian-arm64v8, debian-ppc64le, alpine-arm32v6, alpine-arm64v8, alpine-ppc64le, alpine-lite-arm32v6, alpine-lite-arm64v8, alpine-lite-ppc64le]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: master
- name: Set up Git
run: |
git config user.name "Zonky Bot"
git config user.email "[email protected]"
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 15
- name: Set environment variables
env:
MILESTONE_VERSION: ${{ github.event.milestone.title }}
run: |
echo "RELEASE_VERSION=$MILESTONE_VERSION" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${MILESTONE_VERSION%'.0'}" >> $GITHUB_ENV
- name: Download bundle - arm32v7Debian
uses: actions/download-artifact@v2
with:
name: arm32v7DebianBundle
path: debian-platforms/build/tmp/buildArm32v7DebianBundle/bundle
- name: Download bundle - arm64v8Debian
uses: actions/download-artifact@v2
with:
name: arm64v8DebianBundle
path: debian-platforms/build/tmp/buildArm64v8DebianBundle/bundle
- name: Download bundle - ppc64leDebian
uses: actions/download-artifact@v2
with:
name: ppc64leDebianBundle
path: debian-platforms/build/tmp/buildPpc64leDebianBundle/bundle
- name: Download bundle - arm32v6Alpine
uses: actions/download-artifact@v2
with:
name: arm32v6AlpineBundle
path: alpine-platforms/build/tmp/buildArm32v6AlpineBundle/bundle
- name: Download bundle - arm64v8Alpine
uses: actions/download-artifact@v2
with:
name: arm64v8AlpineBundle
path: alpine-platforms/build/tmp/buildArm64v8AlpineBundle/bundle
- name: Download bundle - ppc64leAlpine
uses: actions/download-artifact@v2
with:
name: ppc64leAlpineBundle
path: alpine-platforms/build/tmp/buildPpc64leAlpineBundle/bundle
- name: Download bundle - arm32v6AlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: arm32v6AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm32v6AlpineLiteBundle/bundle
- name: Download bundle - arm64v8AlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: arm64v8AlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildArm64v8AlpineLiteBundle/bundle
- name: Download bundle - ppc64leAlpineLite
if: ${{ !(startsWith(github.event.milestone.title, '16.')) }}
uses: actions/download-artifact@v2
with:
name: ppc64leAlpineLiteBundle
path: alpine-lite-platforms/build/tmp/buildPpc64leAlpineLiteBundle/bundle
- name: Release with Gradle
env:
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_CERT }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASS }}
run: |
./gradlew uploadArchives --info \
-x buildArm32v7DebianBundle \
-x buildArm64v8DebianBundle \
-x buildPpc64leDebianBundle \
-x buildArm32v6AlpineBundle \
-x buildArm64v8AlpineBundle \
-x buildPpc64leAlpineBundle \
-x buildArm32v6AlpineLiteBundle \
-x buildArm64v8AlpineLiteBundle \
-x buildPpc64leAlpineLiteBundle \
-Pversion=$RELEASE_VERSION \
-PpgVersion=$POSTGRES_VERSION \
-Possrh.username=$MAVEN_USER \
-Possrh.password=$MAVEN_PASS
- name: Create tag
env:
GIT_COMMITTER_DATE: ${{ github.event.milestone.created_at }}
run: |
git tag -a v$RELEASE_VERSION -m "PostgreSQL $POSTGRES_VERSION"
git push -f origin v$RELEASE_VERSION