Skip to content

Commit

Permalink
Update maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
filip26 authored Feb 16, 2024
1 parent 501e977 commit 2ea0100
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
environment: RELEASE
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
Expand All @@ -23,25 +24,25 @@ jobs:
java-package: 'jdk'
cache: 'maven'
server-id: ossrh
- name: Configure Git User
run: |
git config user.email "actions@github.com"
git config user.name "GitHub Actions"
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# - name: Configure Git User
# run: |
# git config user.email "actions@github.com"
# git config user.name "GitHub Actions"
# echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5.0.0
with:
gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Verify Whether a Release is Ready
id: release
shell: bash
run: |
if [ "${{ github.event.inputs.releaseVersion }}" != "" ]; then
echo "auto_release=true" >> $GITHUB_ENV
else
echo "auto_release=false" >> $GITHUB_ENV
fi
# - name: Verify Whether a Release is Ready
# id: release
# shell: bash
# run: |
# if [ "${{ github.event.inputs.releaseVersion }}" != "" ]; then
# echo "auto_release=true" >> $GITHUB_ENV
# else
# echo "auto_release=false" >> $GITHUB_ENV
# fi
- name: Publish package
run: mvn --batch-mode -Pmaven-central -Dgpg.passphrase=${{ secrets.MAVEN_GPG_PASSPHRASE }} deploy
# -DreleaseVersion=${{ github.event.inputs.releaseVersion }} \
Expand Down

0 comments on commit 2ea0100

Please sign in to comment.