Skip to content

Commit

Permalink
Update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Jan 5, 2025
1 parent 0523196 commit 3bc8238
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: build
name: ci
on:
push:
branches:
- version/**
- main
pull_request:
branches:
- version/**
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17', '21', '22', '23', '24-ea' ]
java: [ '8', '11', '17', '21', '22', '23', '24-ea']
architecture: [ 'x64' ]
fail-fast: false
name: Build with JDK ${{ matrix.java }} on ${{ matrix.architecture }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/doclint-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: doclint
on:
push:
branches:
- version/**
- main
pull_request:
branches:
- version/**
- main

jobs:
doc-lint:
Expand All @@ -22,4 +22,4 @@ jobs:
cache: 'maven'

- name: Validate JavaDocs
run: mvn install -DskipTests=true && mvn javadoc:javadoc
run: mvn javadoc:javadoc
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: release
on:
workflow_dispatch:
inputs:
release-tag:
description: 'Version to release'
required: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '21' ]
architecture: [ 'x64' ]

name: Release ${{ github.event.inputs.release-tag }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.release-tag }}

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
cache: 'maven'
server-id: oss.sonatype.org
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE


- name: Release with Maven
run: mvn -B --no-transfer-progress -Psonatype-oss-release -Prelease-sign-artifacts -DskipTests=true deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
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 comments on commit 3bc8238

Please sign in to comment.