-
Notifications
You must be signed in to change notification settings - Fork 221
169 lines (151 loc) · 5.98 KB
/
early-access.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
name: Early Access
on:
push:
branches: [ master ]
workflow_dispatch:
env:
JAVA_RELEASE: '23'
JAVA_VERSION: '23.0.1'
JAVAFX_VERSION: '23.0.1'
jobs:
precheck:
runs-on: ubuntu-20.04
if: startsWith(github.event.head_commit.message, 'Releasing version') != true
outputs:
JAVA_RELEASE: ${{ env.JAVA_RELEASE }}
JAVA_VERSION: ${{ env.JAVA_VERSION }}
JAVAFX_VERSION: ${{ env.JAVAFX_VERSION }}
APP_VERSION: ${{ steps.vars.outputs.APP_VERSION }}
PROJECT_VERSION: ${{ steps.vars.outputs.PROJECT_VERSION }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Java
uses: oracle-actions/[email protected]
with:
website: jdk.java.net
release: ${{ env.JAVA_RELEASE }}
version: ${{ env.JAVA_VERSION }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set environment
id: vars
shell: bash
run: |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
APP_VERSION=$PROJECT_VERSION
APP_VERSION=${APP_VERSION%-*}
echo APP_VERSION=$APP_VERSION >> $GITHUB_OUTPUT
echo PROJECT_VERSION=$PROJECT_VERSION >> $GITHUB_OUTPUT
linux-bundles:
needs: [precheck]
uses: ./.github/workflows/bundles-linux.yml
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true
windows-bundles:
needs: [precheck]
uses: ./.github/workflows/bundles-windows.yml
secrets:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_PASSWORD: ${{ secrets.WINDOWS_PASSWORD }}
WINDOWS_CERTNAME: ${{ secrets.WINDOWS_CERTNAME }}
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true
mac-bundles:
needs: [precheck]
uses: ./.github/workflows/bundles-mac.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }}
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }}
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true
mac_aarch64-bundles:
needs: [precheck]
uses: ./.github/workflows/bundles-mac_aarch64.yml
secrets:
CERTIFICATES_FILE_BASE64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
CERTIFICATES_PASSWORD: ${{ secrets.CERTIFICATES_PASSWORD }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
MACSIGN_USER: ${{ secrets.GLUON_MACSIGN_USER }}
MACSIGN_PREFIX: ${{ secrets.GLUON_MACSIGN_PREFIX }}
with:
javafx-version: ${{ needs.precheck.outputs.JAVAFX_VERSION }}
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
app-version: ${{ needs.precheck.outputs.APP_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
test: true
kit-bundles:
needs: [precheck]
uses: ./.github/workflows/bundles-kit.yml
with:
java-version: ${{ needs.precheck.outputs.JAVA_VERSION }}
project-version: ${{ needs.precheck.outputs.PROJECT_VERSION }}
early-access:
needs: [precheck, linux-bundles, windows-bundles, mac-bundles, mac_aarch64-bundles, kit-bundles]
if: endsWith(${{ needs.precheck.outputs.PROJECT_VERSION }}, '-SNAPSHOT')
runs-on: ubuntu-20.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Set up Java
uses: oracle-actions/[email protected]
with:
website: jdk.java.net
release: ${{ needs.precheck.outputs.JAVA_RELEASE }}
version: ${{ needs.precheck.outputs.JAVA_VERSION }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Deploy parent pom and Kit to local staging
run: |
mvn -B -ntp deploy -pl :parent -Dmaven.test.skip=true
mvn -B -ntp deploy -fkit -Dmaven.test.skip=true
- name: Release with JReleaser
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }}
JRELEASER_NEXUS2_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
run: |
mvn -B -ntp -pl :parent -DartifactsDir=artifacts jreleaser:release
- name: JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: jreleaser-logs
path: |
target/jreleaser/trace.log
target/jreleaser/output.properties