Skip to content

Commit

Permalink
Replace archived maven publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hellhake committed May 3, 2024
1 parent 03acd82 commit 0be27d6
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- replace-archived-maven-publish-action

jobs:
build:
Expand All @@ -14,23 +16,12 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 8
server-id: ossrh
server-username: ${{ secrets.NEXUS_USERNAME }}
server-password: ${{ secrets.NEXUS_USERNAME }}
gpg-private-key: ${{ secrets.GPG_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ env.RELEASE_VERSION }}
draft: false
prerelease: false
- name: Publish to Maven
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
maven_profiles: release
- name: Publish to Apache Maven Central
run: mvn deploy --activate-profiles release

0 comments on commit 0be27d6

Please sign in to comment.