Skip to content

Commit

Permalink
ci: fix maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics authored May 16, 2024
1 parent 5104af9 commit 209a80c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ on:
types: [published]

jobs:
# Build job
update-version:
release:
runs-on: ubuntu-latest
permissions:
contents:
write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
- name: Update PRP Files
uses: CIFriends/prp-preprocessor@0.1.1
with:
Expand All @@ -22,31 +23,20 @@ jobs:
target
env:
currentVersion: ${{ github.event.release.tag_name }}

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
java-package: 'jdk'
cache: 'maven'
server-id: ossrh

- name: mvn versions
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}

- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5.0.0
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Release With Maven
run: |
mvn -s settings.xml -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode deploy -DskipTests -P publish
Expand Down

0 comments on commit 209a80c

Please sign in to comment.