Skip to content

Commit

Permalink
Update maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics authored Jan 17, 2024
1 parent 08ecec5 commit f059e01
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,31 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
- id: install-secret-key
name: Install gpg secret key
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
java-package: 'jdk'
cache: 'maven'
server-id: ossrh
- name: Import GPG Key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Release With Maven
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish package
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
mvn -B -U \
-Pci-cd \
release:prepare \
release:perform \
javadoc:jar \
source:jar \
-s settings.xml \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
-DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
-DdevelopmentVersion=${{ github.event.inputs.developmentVersion }} \
deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

publish-javadoc:
runs-on: ubuntu-latest
Expand Down

0 comments on commit f059e01

Please sign in to comment.