-
Notifications
You must be signed in to change notification settings - Fork 6
188 lines (180 loc) · 6.01 KB
/
release.yml
File metadata and controls
188 lines (180 loc) · 6.01 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
name: Release PatternFly Java
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
deploy-bom:
name: Deploy BOM
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: temurin
cache: maven
- run: $MVN package
working-directory: bom
- uses: actions/setup-java@v5
with: # running setup-java again overwrites the settings.xml
java-version: 25
distribution: temurin
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- run: $MVN deploy -P release
working-directory: bom
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
deploy-patternfly:
name: Deploy Maven Artifacts
runs-on: ubuntu-latest
needs: deploy-bom
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: temurin
cache: maven
- run: $MVN package
- uses: actions/setup-java@v5
with: # running setup-java again overwrites the settings.xml
java-version: 25
distribution: temurin
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- run: $MVN deploy -P release
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
publish-npm:
name: Publish NPM Packages
runs-on: ubuntu-latest
needs: deploy-patternfly
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 25
- run: corepack enable
- name: Configure NPM Authentication
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @patternfly-java/core
working-directory: core/npm
run: pnpm publish --access public --no-git-checks
- name: Publish @patternfly-java/finder
working-directory: extensions/finder/npm
run: pnpm publish --access public --no-git-checks
- name: Publish @patternfly-java/charts
working-directory: charts/npm
run: |
pnpm install
pnpm run build
pnpm publish --access public --no-git-checks
publish-showcase:
name: Publish Showcase
runs-on: ubuntu-latest
needs: publish-npm
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version: 25
- run: corepack enable
- run: pnpm install
working-directory: charts/npm
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: temurin
cache: maven
- run: $MVN --projects org.patternfly:patternfly-java-showcase --also-make -P showcase,prod package
- uses: JamesIves/[email protected]
with:
token: ${{ secrets.PUBLISH_CONTENT }}
repository-name: patternfly-java/patternfly-java.github.io
branch: gh-pages
folder: ./showcase/target/showcase
clean: true
force: true
single-commit: true
publish-apidocs:
name: Publish API Documentation
runs-on: ubuntu-latest
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: ts-graphviz/setup-graphviz@v2
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: temurin
cache: maven
- run: $MVN install
working-directory: bom
- run: $MVN install -Dquickly
- run: $MVN depgraph:aggregate
- run: |
$MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-doc-files
$MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-sources
$MVN org.apache.maven.plugins:maven-antrun-plugin:run@copy-demos
$MVN javadoc:javadoc
working-directory: apidoc
- uses: JamesIves/[email protected]
with:
token: ${{ secrets.PUBLISH_CONTENT }}
repository-name: patternfly-java/apidocs
branch: gh-pages
folder: ./apidoc/target/reports/apidocs
clean: true
force: true
single-commit: true
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: deploy-patternfly
steps:
- name: Get Version
id: get-version
uses: battila7/[email protected]
- uses: actions/checkout@v6
- name: Read Changelog
id: read-changelog
uses: mindsers/changelog-reader-action@v2
with:
path: ./CHANGELOG.md
version: ${{ steps.get-version.outputs.version-without-v }}
- uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
name: PatternFly Java ${{ steps.get-version.outputs.version-without-v }}
body: ${{ steps.read-changelog.outputs.changes }}
draft: false
prerelease: false