Skip to content

Commit

Permalink
build: update jreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-grgt committed Dec 14, 2023
1 parent c3a79a0 commit 188a552
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,52 @@ jobs:
steps:
- name: JReleaser
uses: jreleaser/[email protected]

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Configure build steps as you'd normally do

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'zulu'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

# Post JARs to Maven Central

- name: Release to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
export GPG_TTY=$(tty)
git config user.name "${{ secrets.COMMITTER_NAME }}"
git config user.email "${{ secrets.COMMITTER_EMAIL }}"
mvn -B --file pom.xml release:prepare release:perform
# Create a release

- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Persist logs

- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties

0 comments on commit 188a552

Please sign in to comment.