-
Notifications
You must be signed in to change notification settings - Fork 0
/
jreleaser.yml
652 lines (629 loc) · 16.8 KB
/
jreleaser.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
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
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
environment:
properties:
outputDir: out
jdkPathPrefix: 'build/jdks'
jdkFilePrefix: 'zulu17.50.19-ca-jdk17.0.11'
graalFilePrefix: 'graalvm-community-openjdk-22.0.1+8.1'
nativeImageDir: '{{outputDir}}/jreleaser/assemble/app-native/native-image'
jpackageDir: '{{outputDir}}/jreleaser/assemble/app-installer/jpackage'
skipJpackageResolver: true
skipNativeImageResolver: true
hooks:
environment:
KEY_GLOBAL: global
script:
environment:
KEY_SCRIPT: script
before:
- run: 'echo "{{event.name}} {{event.type}}"'
environment:
KEY_LOCAL: local
platforms:
- '!windows'
command:
environment:
KEY_COMMAND: command
before:
- cmd: 'echo "{{event.name}} {{event.type}}"'
environment:
KEY_LOCAL: local
project:
name: app
description: Sample application
longDescription: Sample application
links:
homepage: https://acme.com/awesome-app
authors:
- Andres Almiray
license: Apache-2.0
java:
groupId: com.acme
version: 8
mainClass: com.acme.Main
inceptionYear: 2021
stereotype: cli
vendor: Kordamp
screenshots:
- url: https://jreleaser.org/images/app-full-release-command.png
caption: JReleaser in action
icons:
- url: https://raw.githubusercontent.com/jreleaser/jreleaser/main/src/media/icon_256x256.png
width: 256
height: 256
tags:
- 'tool'
- 'java'
platform:
replacements:
aarch_64: aarch64
announce:
article:
active: ALWAYS
templateDirectory: src/jreleaser/templates/article
files:
- path: post.md.tpl
repository:
active: ALWAYS
name: smoketests-article
bluesky:
active: ALWAYS
host: https://bsky.social
discord:
active: ALWAYS
discourse:
active: ALWAYS
host: https://discourse.acme.com
discussions:
active: ALWAYS
organization: acme
team: tools
gitter:
active: ALWAYS
googleChat:
active: ALWAYS
linkedin:
active: ALWAYS
http:
news:
active: ALWAYS
url: https://acme.com/news
authorization: BASIC
mail:
active: ALWAYS
host: smtp.acme.com
auth: true
username: duke
from: [email protected]
mastodon:
active: ALWAYS
host: https://mastodon.acme.com
statusTemplate: src/jreleaser/templates/mastodon.tpl
mattermost:
active: ALWAYS
openCollective:
active: ALWAYS
slack:
active: ALWAYS
channel: '#announce'
teams:
active: ALWAYS
telegram:
active: ALWAYS
twitter:
active: ALWAYS
statusTemplate: src/jreleaser/templates/twitter.tpl
webhooks:
acme:
active: ALWAYS
zulip:
active: ALWAYS
account: [email protected]
apiHost: https://zulip.acme.com
release:
github:
overwrite: true
sign: true
discussionCategoryName: 'Announcements'
issues:
enabled: true
changelog:
formatted: ALWAYS
preset: 'conventional-commits'
contributors:
format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
signing:
active: ALWAYS
armored: true
checksum:
algorithms:
- SHA-512
catalog:
sbom:
cyclonedx:
active: ALWAYS
files: false
pack:
enabled: true
name: '{{projectName}}-{{projectVersion}}-cyclonedx-sboms'
syft:
active: ALWAYS
files: false
pack:
enabled: true
name: '{{projectName}}-{{projectVersion}}-syft-sboms'
github:
active: ALWAYS
slsa:
active: ALWAYS
swid:
swid-tag:
active: ALWAYS
assemble:
archive:
mvnw:
active: ALWAYS
attachPlatform: true
formats:
- ZIP
- TAR
- TAR_BZ2
- TAR_GZ
- TAR_XZ
- TAR_ZST
- TBZ2
- TGZ
- TXZ
artifacts:
- path: jreleaser.yml
transform: /META-INF/jreleaser.yml
files:
- pattern: 'pom.xml'
fileSets:
- input: '.'
includes:
- 'LICENSE'
- input: '.mvn'
output: '.mvn'
- input: '.'
output: 'bin'
includes: [ 'mvnw{.cmd,}' ]
swid:
tagRef: swid-tag
javaArchive:
app:
active: ALWAYS
formats:
- ZIP
- TGZ
fileSets:
- input: '.'
includes:
- 'LICENSE'
mainJar:
path: target/{{distributionName}}-{{projectVersion}}.jar
java:
jvmOptions:
universal:
- '-Dfoo={{projectVersion}}'
unix:
- '-Dbar={{projectVersion}}'
osx:
- '-Dfoobar={{projectVersion}}'
linux:
- '-Dbazinga={{projectVersion}}'
environmentVariables:
universal:
FOO: foo
unix:
BAR: bar
osx:
FOOBAR: foobar
linux:
BAZINGA: bazinga
jlink:
app-standalone:
active: ALWAYS
java:
version: 17
imageName: '{{distributionName}}-{{projectEffectiveVersion}}'
executable: app
jdeps:
multiRelease: base
ignoreMissingDeps: true
targetJdks:
- path: '{{jdkPathPrefix}}/zulu17Osx/{{jdkFilePrefix}}-macosx_x64/zulu-17.jdk/Contents/Home'
platform: 'osx-x86_64'
- path: '{{jdkPathPrefix}}/zulu17OsxArm/{{jdkFilePrefix}}-macosx_aarch64/zulu-17.jdk/Contents/Home'
platform: 'osx-aarch_64'
- path: '{{jdkPathPrefix}}/zulu17Linux/{{jdkFilePrefix}}-linux_x64'
platform: 'linux-x86_64'
- path: '{{jdkPathPrefix}}/zulu17LinuxArm/{{jdkFilePrefix}}-linux_aarch64'
platform: 'linux-aarch_64'
- path: '{{jdkPathPrefix}}/zulu17LinuxMusl/{{jdkFilePrefix}}-linux_musl_x64'
platform: 'linux_musl-x86_64'
- path: '{{jdkPathPrefix}}/zulu17LinuxMuslArm/{{jdkFilePrefix}}-linux_musl_aarch64'
platform: 'linux_musl-aarch_64'
- path: '{{jdkPathPrefix}}/zulu17Windows/{{jdkFilePrefix}}-win_x64'
platform: 'windows-x86_64'
- path: '{{jdkPathPrefix}}/zulu17WindowsArm/{{jdkFilePrefix}}-win_aarch64'
platform: 'windows-aarch_64'
mainJar:
path: 'target/app-{{projectVersion}}.jar'
jpackage:
app-installer:
active: ALWAYS
jlink: app-standalone
attachPlatform: true
applicationPackage:
appName: app
appVersion: '{{projectVersionNumber}}'
vendor: Acme
osx:
types: [pkg]
appName: App
packageName: App
packageIdentifier: com.acme.app
icon: 'src/jreleaser/icons/app.icns'
resourceDir: 'src/app/osx'
linux:
types: [deb,rpm]
maintainer: [email protected]
icon: 'src/jreleaser/icons/icon_256x256.png'
windows:
types: [msi]
console: true
dirChooser: true
icon: 'src/jreleaser/icons/app.ico'
resourceDir: 'src/jpackage/windows'
nativeImage:
app-native:
active: ALWAYS
java:
version: 17
imageName: '{{distributionName}}-{{projectEffectiveVersion}}'
executable: app
mainJar:
path: 'target/app-{{projectVersion}}.jar'
graalJdks:
- path: '{{jdkPathPrefix}}/graal22Osx/{{graalFilePrefix}}/Contents/Home'
platform: 'osx-x86_64'
- path: '{{jdkPathPrefix}}/graal22Linux/{{graalFilePrefix}}'
platform: 'linux-x86_64'
- path: '{{jdkPathPrefix}}/graal22Windows/{{graalFilePrefix}}'
platform: 'windows-x86_64'
upx:
active: ALWAYS
version: '3.96'
args:
- '-Duser.language=en'
- '-H:Optimize=2'
- '-H:+RemoveUnusedSymbols'
distributions:
app-uber:
type: SINGLE_JAR
artifacts:
- path: target/app-{{projectVersion}}.jar
java:
artifactId: app
app:
flatpak:
active: ALWAYS
continueOnError: true
componentId: com.acme.app
developerName: Acme
runtime: freedesktop
runtimeVersion: 21.08
categories:
- Developer Tools
repository:
active: RELEASE
name: come.acme.app
branch: master
chocolatey:
active: ALWAYS
remoteBuild: true
title: App
iconUrl: 'https://rawcdn.githack.com/jreleaser/jreleaser/0934fa1fa3f0bd09c0c8c39fbdeb5df2ce507457/src/media/icon_128x128.png'
bucket:
active: RELEASE
name: smoketests-chocolatey
jbang:
active: NEVER
macports:
active: ALWAYS
categories:
- devel
- java
maintainers:
- '@duke'
repository:
active: RELEASE
name: smoketests-macports
scoop:
active: ALWAYS
bucket:
active: RELEASE
name: smoketests-scoop
sdkman:
active: RELEASE
snap:
active: ALWAYS
remoteBuild: true
base: core18
architectures:
- buildOn: [ amd64, arm64 ]
spec:
active: ALWAYS
repository:
active: RELEASE
name: smoketests-copr
artifacts:
- path: '{{outputDir}}/jreleaser/assemble/{{distributionName}}/java-archive/{{distributionName}}-{{projectVersion}}.zip'
extraProperties:
skipSpec: true
- path: '{{outputDir}}/jreleaser/assemble/{{distributionName}}/java-archive/{{distributionName}}-{{projectVersion}}.tgz'
extraProperties:
skipFlatpak: true
app-standalone:
executable:
name: app
windowsExtension: bat
appImage:
active: ALWAYS
continueOnError: true
componentId: com.acme.app
developerName: App
categories:
- Development
repository:
active: RELEASE
name: smoketests-appimage
commitMessage: 'app {{tagName}}'
brew:
active: ALWAYS
formulaName: app
multiPlatform: true
tap:
active: RELEASE
name: homebrew-smoke
commitMessage: 'app {{tagName}}'
docker:
active: ALWAYS
repository:
active: ALWAYS
commitMessage: 'app {{tagName}}'
registries:
- serverName: DEFAULT
username: app
labels:
'org.opencontainers.image.title': 'app'
postCommands:
- 'VOLUME /workspace'
specs:
slim:
imageNames:
- 'app/app-{{dockerSpecName}}:{{tagName}}'
- 'app/app-{{dockerSpecName}}:latest'
matchers:
platform: 'linux-x86_64'
preCommands:
- 'ARG DEBIAN_FRONTEND=noninteractive'
- 'ENV TZ=Europe/Zurich'
- 'RUN apt-get update && apt-get install -y unzip binutils fakeroot rpm'
alpine:
imageNames:
- 'app/app-{{dockerSpecName}}:{{tagName}}'
- 'app/app-{{dockerSpecName}}:latest'
matchers:
platform: 'linux_musl-x86_64'
preCommands:
- 'RUN apk add unzip binutils fakeroot rpm bash'
jib:
active: ALWAYS
repository:
active: ALWAYS
commitMessage: 'app {{tagName}}'
registries:
- name: github
server: ghcr.io
labels:
'org.opencontainers.image.title': 'app'
specs:
slim:
imageNames:
- 'app/app-{{jibSpecName}}:{{tagName}}'
- 'app/app-{{jibSpecName}}:latest'
matchers:
platform: 'linux-x86_64'
alpine:
imageNames:
- 'app/app-{{jibSpecName}}:{{tagName}}'
- 'app/app-{{jibSpecName}}:latest'
matchers:
platform: 'linux_musl-x86_64'
app-installer:
winget:
active: RELEASE
package:
name: app
repository:
active: ALWAYS
name: app-winget
commitMessage: 'app {{tagName}}'
executable:
name: app
windowsExtension: exe
artifacts:
- path: '{{jpackageDir}}/App-{{projectVersionNumber}}-osx-x86_64.pkg'
platform: 'osx-x86_64'
- path: '{{jpackageDir}}/app_{{projectVersionNumber}}-1_amd64.deb'
platform: 'linux-x86_64'
- path: '{{jpackageDir}}/app-{{projectVersionNumber}}-1.x86_64.rpm'
platform: 'linux-x86_64'
- path: '{{jpackageDir}}/app-{{projectVersionNumber}}-windows-x86_64.msi'
platform: 'windows-x86_64'
app-native:
executable:
name: app
windowsExtension: exe
artifacts:
- path: '{{nativeImageDir}}/{{distributionName}}-{{projectVersion}}-osx-x86_64.zip'
platform: 'osx-x86_64'
- path: '{{nativeImageDir}}/{{distributionName}}-{{projectVersion}}-linux-x86_64.zip'
platform: 'linux-x86_64'
- path: '{{nativeImageDir}}/{{distributionName}}-{{projectVersion}}-windows-x86_64.zip'
platform: 'windows-x86_64'
app-flat:
executable:
name: app
windowsExtension: bat
artifacts:
- path: 'src/flat/app'
platform: 'osx-x86_64'
- path: 'src/flat/app'
platform: 'osx-aarch_64'
- path: 'src/flat/app'
platform: 'linux-x86_64'
- path: 'src/flat/app'
platform: 'linux-aarch_64'
- path: 'src/flat/app'
platform: 'linux_musl-x86_64'
- path: 'src/flat/app'
platform: 'linux_musl-aarch_64'
- path: 'src/flat/app.bat'
platform: 'windows-x86_64'
- path: 'src/flat/app.bat'
platform: 'windows-aarch_64'
files:
artifacts:
- path: LICENSE
extraProperties:
skipChecksum: true
skipSigning: true
deploy:
maven:
github:
acme:
active: ALWAYS
stagingRepositories:
- target/staging-deploy
gitlab:
acme:
active: ALWAYS
url: https://gitlab.com/api/v4/projects/{{projectIdentifier}}/packages/maven
projectIdentifier: 12345678
stagingRepositories:
- target/staging-deploy
gitea:
acme:
active: ALWAYS
url: https://codeberg.org/api/packages/{{owner}}/maven
stagingRepositories:
- target/staging-deploy
mavenCentral:
sonatype:
active: ALWAYS
url: https://central.sonatype.com/api/v1/publisher
stagingRepositories:
- target/staging-deploy
nexus2:
maven-central:
active: ALWAYS
url: https://s01.oss.sonatype.org/service/local
snapshotUrl: https://ossrh.oss.sonatype.org/content/repositories/snapshots/
closeRepository: true
releaseRepository: true
stagingRepositories:
- target/staging-deploy
artifactory:
acme:
active: ALWAYS
url: https://acme.jfrog.io/artifactory/maven
sign: true
applyMavenCentralRules: true
stagingRepositories:
- target/staging-deploy
azure:
acme:
active: ALWAYS
url: https://pkgs.dev.azure.com/acme/_packaging/acme/maven/v1
sign: true
applyMavenCentralRules: true
stagingRepositories:
- target/staging-deploy
download:
active: ALWAYS
http:
d1:
assets:
- input: https://github.com/jreleaser/jreleaser/raw/main/src/media/icon_256x256.png
output: '{{projectName}}.png'
- input: https://github.com/ixchelruiz/app/releases/download/v1.0.0/app-{{projectVersion}}.zip
unpack:
enabled: true
ftp:
d2:
assets:
- input: upload/app.png
- input: upload/app-{{projectVersion}}.zip
unpack:
enabled: true
scp:
d3:
assets:
- input: /tmp/upload/app.png
output: '{{downloaderName}}/{{artifactFile}}'
- input: /tmp/upload/app-{{projectVersion}}.zip
unpack:
enabled: true
sftp:
d4:
assets:
- input: /tmp/upload/app.png
- input: /tmp/upload/app-{{projectVersion}}.zip
unpack:
enabled: true
upload:
artifactory:
u1:
active: ALWAYS
host: https://acme.jfrog.io/artifactory
repositories:
- path: 'binaries/{{projectName}}/{{projectVersion}}/{{artifactFile}}'
ftp:
u2:
active: ALWAYS
path: 'uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'
downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
gitea:
u3:
active: ALWAYS
host: gitea.acme.com
owner: duke
packageName: app
gitlab:
u4:
active: ALWAYS
host: gitlab.acme.com
packageName: app
projectIdentifier: 12345678
http:
u5:
active: ALWAYS
uploadUrl: 'https://artifacts.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
s3:
u6:
active: ALWAYS
scp:
u7:
active: ALWAYS
host: uploads.acme.com
path: '/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'
downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'
sftp:
u8:
active: ALWAYS
host: uploads.acme.com
path: '/uploads/{{projectName}}/{{tagName}}/{{artifactFile}}'
downloadUrl: 'https://download.acme.com/{{projectName}}/{{tagName}}/{{artifactFile}}'