Skip to content

Commit

Permalink
🎂 improve actions yml
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Jan 29, 2024
1 parent 461fbb2 commit 2b0b89b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Release-To-OssRh
run-name: Deploy ${{github.event.release.tag_name}} to Sonatype by @${{ github.actor }}
run-name: Release ${{github.ref_name}} by @${{ github.event_name }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -76,6 +76,9 @@ jobs:
echo $_ver
echo "WINGS_VERSION=$_ver" >> "$GITHUB_OUTPUT"
echo "MVN_COVERAGE=${{ inputs.testCoverReport || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
echo "MVN_DEPLOYRH=${{ inputs.deployOssrh || github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"
mvn -v
git --no-pager log --graph -10 --pretty=format:'%H - %ai %d %s'
Expand All @@ -95,7 +98,7 @@ jobs:
## report if not release
- name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: inputs.testCoverReport
if: steps.settings.outputs.MVN_COVERAGE
run: >
mvn
-P coverage
Expand All @@ -106,15 +109,15 @@ jobs:
JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }}
## import gpp private key
- name: Import GPG key
if: inputs.deployOssrh
if: steps.settings.outputs.MVN_DEPLOYRH
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.MVN_GPG_SKEY }}
passphrase: ${{ secrets.MVN_GPG_PASS }}

## maven deploy
- name: Deploy ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: inputs.deployOssrh
if: steps.settings.outputs.MVN_DEPLOYRH
run: >
mvn
-P ossrh
Expand Down

0 comments on commit 2b0b89b

Please sign in to comment.