-
Notifications
You must be signed in to change notification settings - Fork 56
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
1 parent
5f56efb
commit ec26133
Showing
4 changed files
with
63 additions
and
55 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Sonatype Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: 'ubuntu-latest' | ||
environment: main_env | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure GHA bot # used to commit release and snapshot versions | ||
# GHA Bot (which sets next snapshot version) should be authenticated by actions/checkout, see: | ||
# https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
- name: Cache Maven packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: Linux-java11-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: Linux-java11-m2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
# setup-java generates a settings.xml pointing deployments to Sonatype | ||
# See https://github.com/actions/setup-java/blob/v3.11.0/docs/advanced-usage.md#publishing-using-apache-maven | ||
server-id: ossrh | ||
server-username: SONATYPE_USERNAME | ||
server-password: SONATYPE_TOKEN | ||
gpg-private-key: ${{ secrets.GPG_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
- name: Release | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
# Todo - remove dry-run flag once validated in GHA | ||
run: | | ||
export GPG_TTY=$(tty) | ||
mvn -B release:prepare release:perform -DreleaseVersion=${{ github.event.inputs.version }} -DdryRun=true |
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
This file was deleted.
Oops, something went wrong.
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