Skip to content

Commit 8a8da1e

Browse files
authored
Update GitHub Actions workflows (#2968)
1 parent 0523196 commit 8a8da1e

File tree

3 files changed

+50
-7
lines changed

3 files changed

+50
-7
lines changed

.github/workflows/build-version.yml renamed to .github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: build
1+
name: ci
22
on:
33
push:
44
branches:
5-
- version/**
5+
- main
66
pull_request:
77
branches:
8-
- version/**
8+
- main
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
java: [ '8', '11', '17', '21', '22', '23', '24-ea' ]
15+
java: [ '8', '11', '17', '21', '22', '23', '24-ea']
1616
architecture: [ 'x64' ]
1717
fail-fast: false
1818
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }}

.github/workflows/doclint-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: doclint
22
on:
33
push:
44
branches:
5-
- version/**
5+
- main
66
pull_request:
77
branches:
8-
- version/**
8+
- main
99

1010
jobs:
1111
doc-lint:
@@ -22,4 +22,4 @@ jobs:
2222
cache: 'maven'
2323

2424
- name: Validate JavaDocs
25-
run: mvn install -DskipTests=true && mvn javadoc:javadoc
25+
run: mvn javadoc:javadoc

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release-tag:
6+
description: 'Version to release'
7+
required: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java: [ '21' ]
15+
architecture: [ 'x64' ]
16+
17+
name: Release ${{ github.event.inputs.release-tag }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.inputs.release-tag }}
22+
23+
- name: Setup JDK
24+
uses: actions/setup-java@v4
25+
with:
26+
distribution: 'oracle'
27+
java-version: ${{ matrix.java }}
28+
architecture: ${{ matrix.architecture }}
29+
cache: 'maven'
30+
server-id: oss.sonatype.org
31+
server-username: MAVEN_USERNAME
32+
server-password: MAVEN_PASSWORD
33+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
34+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
35+
36+
37+
- name: Release with Maven
38+
run: mvn -B --no-transfer-progress -Psonatype-oss-release -Prelease-sign-artifacts -DskipTests=true deploy
39+
env:
40+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
41+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
42+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
43+
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

0 commit comments

Comments
 (0)