Repository navigation
567 lines (508 loc) · 24 KB
/
Copy pathrelease.yml
File metadata and controls
567 lines (508 loc) · 24 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
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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
name: Release
# Tags only, and the tag is the version: the build reads it from GITHUB_REF_NAME, and jreleaserDeploy and
# publishPlugins refuse anything that is not a clean X.Y.Z or X.Y.Z.N.
#
# Two deployments per tag, because a published groupId:artifactId:version can never gain files
# afterwards: the jars go up as one, and every platform's native binary as another. Each is uploaded and
# validated first, and the publish job publishes both only once both are in. A version whose native build
# fails publishes nothing, and its deployments can be dropped in the Portal.
#
# Once Maven Central serves both, the Gradle plugins go to the Gradle Plugin Portal, signed with the same
# release key, and the IntelliJ plugin goes to the JetBrains Marketplace, verified against the IDEs it
# supports first. After publishing, a draft GitHub release on the tag collects the runnable jar, the Gradle
# and IDE plugins, the native binaries, the Linux binaries again as .deb packages, and the WebAssembly module,
# which a job of its own builds on Oracle GraalVM.
#
# The release notes, release-notes/<version>.md, are on the tag before it is pushed: they are the text of
# the GitHub release and the IntelliJ plugin's change notes, and a tag without them publishes nothing.
#
# A tag runs the workflow of the commit it points at, so this one releases the 21 line, and it refuses a tag that
# is not a 21.x: a 17.x tag on a commit of this line would publish the 21 line's jars, images and plugins under a
# version of the 17 line. A line cut from this one changes the pattern, as 17.X.X did.
#
# Needs seven repository secrets: JRELEASER_MAVENCENTRAL_USERNAME and JRELEASER_MAVENCENTRAL_PASSWORD (the
# Central Portal user token), JRELEASER_GPG_SECRET_KEY and JRELEASER_GPG_PASSPHRASE, GRADLE_PUBLISH_KEY and
# GRADLE_PUBLISH_SECRET (the Gradle Plugin Portal key) and JETBRAINS_MARKETPLACE_TOKEN (a permanent token of
# the Marketplace account that owns the plugin). The draft release uses the workflow's own GITHUB_TOKEN.
on:
push:
tags:
- '*'
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
# The release notes are the IntelliJ plugin's change notes, which the Marketplace shows for the version and
# the IDE under What's New, and the Marketplace never lets the change notes of an uploaded version change: so
# the publish job waits for this one. The IDE does not render Markdown. GitHub's Markdown API renders the
# notes as GitHub renders a release, with the runner's gh and jq, so the build needs no converter; sed then
# drops the attributes GitHub adds for its own pages, such as its hovercards'. release-notes/README.md says
# how to write them. The job refuses a tag of another release line first, so every job that builds waits for it.
release-notes:
name: release notes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Refuse a tag of another release line
env:
VERSION: ${{ github.ref_name }}
run: |
case "$VERSION" in
21.*) ;;
*)
echo "::error::${VERSION} is not a version of the 21 line, whose tags are 21.<minor>.<build>"
exit 1
;;
esac
# The shell named, since only then does GitHub run bash with pipefail: a failed gh api fails the step
# instead of leaving sed an empty file.
- name: Render the release notes for the IDE
shell: bash
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ github.ref_name }}
run: |
notes="release-notes/${VERSION}.md"
if [ ! -s "$notes" ]; then
echo "::error::No release notes for ${VERSION}: add ${notes} to the release line, then move the tag onto that commit"
exit 1
fi
mkdir change-notes
jq --null-input --rawfile text "$notes" '{text: $text, mode: "gfm"}' \
| gh api markdown --input - \
| sed -E 's/ (dir|class|rel|data-[a-z-]+)="[^"]*"//g' > change-notes/change-notes.html
cat change-notes/change-notes.html
- name: Hand the change notes to the IntelliJ plugin's jobs
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: change-notes
path: change-notes/change-notes.html
if-no-files-found: error
retention-days: 1
jars:
name: jars
needs: release-notes
runs-on: ubuntu-latest
outputs:
deployment-id: ${{ steps.deployment.outputs.id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Stage, sign and upload the jars
run: ./gradlew jreleaserDeploy
env:
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
- name: Hand the deployment to the publish job
id: deployment
run: |
id="$(sed -n 's/^deployMavenCentralSonatypeDeploymentId=//p' build/jreleaser/output.properties)"
if [ -z "$id" ]; then
echo "No deployment ID in build/jreleaser/output.properties"
exit 1
fi
echo "id=$id" >> "$GITHUB_OUTPUT"
- name: Keep JReleaser's log
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: jreleaser-log-jars
path: build/jreleaser/trace.log
if-no-files-found: ignore
retention-days: 7
# One job per platform, as in ci.yml, but here each one hands its binary to the deploy job below
# instead of throwing it away. macOS on Apple silicon is built here only: ci.yml leaves it out.
native-images:
name: native image (${{ matrix.runner }})
needs: release-notes
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
# bash on Windows too, as in ci.yml.
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
# The images of ci.yml: Linux on the previous Ubuntu LTS, for an older glibc, the rest the newest.
runner:
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-latest
- macos-26-intel
- windows-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The Java 21 toolchain for the jars, through JDK21_HOME, as in ci.yml: Gradle does not find the
# runner's own JDK 21 on Windows. Installed before GraalVM, so that Gradle still runs on GraalVM.
- name: Install JDK 21 for the jars
id: jdk21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Install GraalVM 25 for the image
uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10
with:
java-version: '25'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile the native image
run: ./gradlew -PnativeImage=true :open-java-format-native:nativeCompile
env:
JDK21_HOME: ${{ steps.jdk21.outputs.path }}
- name: Hand the binary to the deploy job
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: native-image-${{ matrix.runner }}
path: |
open-java-format-native/build/native/nativeCompile/open-java-format-*
!open-java-format-native/build/native/nativeCompile/*.txt
if-no-files-found: error
retention-days: 1
# The Linux binaries as .deb packages, for the GitHub release and for the apt repository, openjavaformat/apt,
# which serves the packages of the newest release. Each is built on the runner its binary was built on and
# installed with apt on the oldest Ubuntu and Debian it supports before it goes into the release, by the
# deb-package action that ci.yml runs too. The time of the tag's commit is the time of every file in a
# package, so a re-run makes the same bytes.
deb-packages:
name: deb package (${{ matrix.runner }})
needs: native-images
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-24.04
- ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Collect the binary
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: native-image-${{ matrix.runner }}
path: native-image
- name: Find the binary
id: binary
run: |
echo "path=$(ls native-image/open-java-format-linux-glibc_*)" >> "$GITHUB_OUTPUT"
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> "$GITHUB_ENV"
- name: Package and install the binary
uses: $/.github/actions/deb-package
with:
binary: ${{ steps.binary.outputs.path }}
version: ${{ github.ref_name }}
out-dir: deb-package
- name: Hand the package to the GitHub release
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: deb-package-${{ matrix.runner }}
path: deb-package/*.deb
if-no-files-found: error
retention-days: 1
# Not `native`: ci.yml already has a job with that id, and `act --job native` could not tell them apart.
native-deploy:
name: native deploy
needs: native-images
runs-on: ubuntu-latest
outputs:
deployment-id: ${{ steps.deployment.outputs.id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
# merge-multiple: every platform's binary lands in one directory under the name it was built
# with, which is where its Maven classifier is read from.
- name: Collect every platform's binary
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: native-images
pattern: native-image-*
merge-multiple: true
- name: Show what was collected
run: ls -l native-images
# No GraalVM here: nothing is compiled, the binaries are uploaded exactly as they arrived.
- name: Stage, sign and upload the native images
run: ./gradlew -PreleaseTarget=native -PnativeImages=native-images jreleaserDeploy
env:
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
- name: Hand the deployment to the publish job
id: deployment
run: |
id="$(sed -n 's/^deployMavenCentralSonatypeDeploymentId=//p' build/jreleaser/output.properties)"
if [ -z "$id" ]; then
echo "No deployment ID in build/jreleaser/output.properties"
exit 1
fi
echo "id=$id" >> "$GITHUB_OUTPUT"
- name: Keep JReleaser's log
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: jreleaser-log-native
path: build/jreleaser/trace.log
if-no-files-found: ignore
retention-days: 7
# The formatter as a WebAssembly module, for the playground on openjavaformat.dev. Built on Oracle GraalVM, the
# only distribution with the Web Image backend (native-image --tool:svm-wasm), and tested in Node against the
# runnable jar of the same tag. Maven Central does not carry it, so only the draft GitHub release waits for it: a
# failure here holds back nothing else, and "Re-run failed jobs" builds it again and then opens the draft.
wasm:
name: wasm
needs: release-notes
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# The jars, and the runnable jar the module is compared with, compile with Java 21 through JDK21_HOME, as in
# native-images. Installed before GraalVM, so that Gradle still runs on GraalVM.
- name: Install JDK 21 for the jars
id: jdk21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
# Pinned to the patch: Web Image is experimental, and its options and output change between releases.
- name: Install Oracle GraalVM 25 for the module
uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10
with:
java-version: '25.0.4'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Web Image runs wasm-opt from the PATH, and needs Binaryen 119 or later; Ubuntu's package is older.
- name: Install Binaryen
env:
BINARYEN_VERSION: version_133
BINARYEN_SHA256: 2dc9c7813f5375db93d96ead4b78222fcc3e2677bbb832297af4797782a37489
run: |
archive="binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz"
curl --fail --silent --show-error --location --output "${RUNNER_TEMP}/${archive}" \
"https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${archive}"
echo "${BINARYEN_SHA256} ${RUNNER_TEMP}/${archive}" | sha256sum --check
tar -xzf "${RUNNER_TEMP}/${archive}" -C "${RUNNER_TEMP}"
echo "${RUNNER_TEMP}/binaryen-${BINARYEN_VERSION}/bin" >> "$GITHUB_PATH"
# The tests run the module as a page does, and Node 24 has the WebAssembly GC and exception handling it needs.
# No cache: the tests install no packages, and a release must not restore one another run could have written.
- name: Install Node.js 24 for the tests
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '24'
package-manager-cache: false
# wasmTest: the smoke test, then every Java 21 and Java 25 test case's input against the runnable jar.
- name: Build and test the module
run: ./gradlew -Pwasm=true :open-java-format-wasm:wasmTest :open-java-format-wasm:wasmZip
env:
JDK21_HOME: ${{ steps.jdk21.outputs.path }}
- name: Hand the module to the GitHub release
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: wasm-module
path: open-java-format-wasm/build/distributions/open-java-format-wasm-*.zip
if-no-files-found: error
retention-days: 1
# Both deployments are uploaded and validated by now, and the release notes rendered. Publishing one is a
# JReleaser run given its ID, which builds nothing. One leg per deployment, so that a re-run repeats only
# the leg that failed.
publish:
name: publish (${{ matrix.deployment }})
needs: [jars, native-deploy, release-notes]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- deployment: jars
id: ${{ needs.jars.outputs.deployment-id }}
- deployment: native
id: ${{ needs.native-deploy.outputs.deployment-id }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Publish the deployment
run: ./gradlew jreleaserDeploy
env:
JRELEASER_MAVENCENTRAL_DEPLOYMENT_ID: ${{ matrix.id }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.JRELEASER_MAVENCENTRAL_PASSWORD }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
- name: Keep JReleaser's log
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: jreleaser-log-publish-${{ matrix.deployment }}
path: build/jreleaser/trace.log
if-no-files-found: ignore
retention-days: 7
# The plugins depend on the version's jars and native images, so they go up only once Maven Central
# serves both, which takes some minutes after the publish job. The Gradle Plugin Portal never takes a
# version back.
gradle-plugins:
name: Gradle plugins
needs: publish
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Wait for Maven Central to serve the version
env:
VERSION: ${{ github.ref_name }}
run: |
for artifact in open-java-format open-java-format-native; do
url="https://repo1.maven.org/maven2/dev/openjavaformat/${artifact}/${VERSION}/${artifact}-${VERSION}.pom"
until curl --silent --fail --head --output /dev/null "$url"; do
echo "Waiting for ${url}"
sleep 30
done
done
- name: Sign and publish the Gradle plugins
run: ./gradlew :gradle-open-java-format:publishPlugins
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
# The IntelliJ plugin carries the formatter jars inside its zip, so it does not wait for Maven Central. It
# waits for the publish job like everything else, so that a version whose jars or native images failed
# stays off the Marketplace too. The plugin is checked against the IDEs it declares support for before it
# goes up; a plugin that fails there would fail JetBrains' own check after the upload anyway. The
# Marketplace never takes a version back and rejects a version it already has, so a re-run of this job
# fails once the upload went through.
jetbrains-plugin:
name: JetBrains Marketplace
needs: [publish, release-notes]
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Collect the change notes
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: change-notes
path: change-notes
# Both runs get the change notes, so that the zip verified is the zip uploaded: without them in one,
# patchPluginXml would run again and build another.
- name: Verify the plugin against the IDEs it supports
run: ./gradlew -PchangeNotes=change-notes/change-notes.html :open-java-format-idea-plugin:verifyPlugin
- name: Keep the verifier's report
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: plugin-verifier-report
path: open-java-format-idea-plugin/build/reports/pluginVerifier
if-no-files-found: ignore
retention-days: 7
- name: Upload the plugin
run: ./gradlew -PchangeNotes=change-notes/change-notes.html :open-java-format-idea-plugin:publishPlugin
env:
JETBRAINS_MARKETPLACE_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
# What Maven Central does not carry — the runnable formatter jar, the Gradle plugins' jar, the IntelliJ
# plugin zip, the Eclipse plugin jar, every platform's native binary as a plain download, the .deb
# packages and the WebAssembly module — goes into a draft GitHub release on the tag, each file signed with
# the release key. Its text is release-notes/<version>.md, and the plugin zip has the same change notes as
# the one on the Marketplace. Only once both deployments are published and the packages and the module are
# built; publishing the draft is a click on GitHub, and a re-run fails while a release for the tag exists.
github-release:
name: draft GitHub release
needs: [publish, deb-packages, wasm, release-notes]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install JDK 21
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: temurin
java-version: '21'
- name: Collect every platform's binary
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: native-images
pattern: native-image-*
merge-multiple: true
- name: Collect the .deb packages
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: deb-packages
pattern: deb-package-*
merge-multiple: true
- name: Collect the WebAssembly module
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: wasm-module
path: wasm-module
- name: Collect the change notes
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: change-notes
path: change-notes
- name: Build the plugins and open the draft release
run: >-
./gradlew -PreleaseTarget=github -PnativeImages=native-images -PdebPackages=deb-packages
-PwasmModule=wasm-module -PchangeNotes=change-notes/change-notes.html jreleaserRelease
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
- name: Keep JReleaser's log
if: ${{ failure() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: jreleaser-log-github
path: build/jreleaser/trace.log
if-no-files-found: ignore
retention-days: 7