Skip to content

Commit

Permalink
Update gh actions for the new release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
kkorotkov authored Aug 9, 2022
1 parent 9d7e41f commit 55386a4
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/netlicensing-client-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ on:
release-version:
required: true
description: The release version X.Y.Z
development-version:
required: true
description: The next development version X.Y.Z-SNAPSHOT

jobs:
release:
name: Release ${{ github.event.inputs.release-version }}
runs-on: self-hosted
container: maven:3.8.6-openjdk-11
name: Release ${{ github.event.inputs.release-version }} (next dev ${{ github.event.inputs.development-version }})

steps:
- uses: actions/checkout@v3
Expand All @@ -27,8 +24,7 @@ jobs:
- name: Prepare git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
git config --global core.sshCommand "$(git config --local --get core.sshCommand)"
git config user.email "[email protected]"
- name: Prepare maven settings.xml
run: |
Expand All @@ -49,12 +45,11 @@ jobs:
- name: Import GPG key
run: echo "${{ secrets.GPG_KEY }}" | base64 -d | gpg --pinentry-mode loopback --passphrase "${{ secrets.GPG_KEY_PASS }}" --import

- name: Release with Maven
- name: Release to Maven Central staging
run: |
mvn -B release:prepare -Prelease \
-DautoVersionSubmodules=true \
-DreleaseVersion=${{ github.event.inputs.release-version }} \
-Dtag=${{ github.event.inputs.release-version }} \
-DdevelopmentVersion=${{ github.event.inputs.development-version }} \
-Darguments="-Dgpg.passphrase=${{ secrets.GPG_KEY_PASS }}"
mvn -B release:perform -Prelease
mvn -s ~/.m2/settings.xml -B \
clean deploy scm:tag \
-P release \
-Drevision=${{ github.event.inputs.release-version }} \
-Dmessage="Release ${{ github.event.inputs.release-version }}" \
-Dgpg.passphrase=${{ secrets.GPG_KEY_PASS }}

0 comments on commit 55386a4

Please sign in to comment.