Skip to content

Commit

Permalink
Change actions order to pack first and release after
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Sep 18, 2023
1 parent 5afb6b8 commit d6ab75c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set projects Maven version to GitHub Action GUI set version
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"

- name: Build with Maven
run: mvn -B package --file pom.xml -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
with:
Expand All @@ -25,13 +33,9 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Set projects Maven version to GitHub Action GUI set version
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}"

- name: Publish to Apache Maven Central
run: mvn -B clean deploy -Psign --file pom.xml -DskipTests=true
run: mvn -B deploy -Psign --file pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME}}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 comments on commit d6ab75c

Please sign in to comment.