-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,13 @@ on: | |
|
||
jobs: | ||
release: | ||
name: Release ${{ github.event.inputs.release-version }} | ||
name: Release ${{ github.event.inputs.release-version }} / Java ${{ matrix.java-version }} | ||
runs-on: self-hosted | ||
container: maven:3-amazoncorretto-17 | ||
env: | ||
RELEASE_WORK_DIR: checkout-for-release | ||
container: maven:3-amazoncorretto-17-al2023 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java-version: [11, 17] | ||
include: | ||
|
@@ -24,13 +27,20 @@ jobs: | |
jdk-suffix: -jdk17 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Specific to maven:3-amazoncorretto-17-al2023 image | ||
- name: Install required tooling | ||
run: yum install -y --allowerasing git gnupg2 | ||
|
||
- name: Checkout the sources | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.RELEASE_WORK_DIR }} | ||
ssh-key: '${{ secrets.REPO_SSH_KEY }}' | ||
|
||
# Relies on actions/checkout with 'ssh-key' parameter. | ||
- name: Prepare git config | ||
run: | | ||
cd $RELEASE_WORK_DIR | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "[email protected]" | ||
|
@@ -61,12 +71,13 @@ jobs: | |
- name: Release to Maven Central staging | ||
run: | | ||
cd $RELEASE_WORK_DIR | ||
mvn -s ~/.m2/settings.xml -B \ | ||
clean deploy scm:tag \ | ||
-P release \ | ||
-Drevision=${{ github.event.inputs.release-version }} \ | ||
-Dsha1=$BRANCH_SUFFIX \ | ||
-Dchangelist= \ | ||
-Djava.version=${{ matrix.java-version }} | ||
-Djava.version=${{ matrix.java-version }} \ | ||
-Dmessage="Release ${{ github.event.inputs.release-version }}" \ | ||
-Dgpg.passphrase=${{ secrets.GPG_KEY_PASS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters