Skip to content

Commit

Permalink
Merge pull request #26 from vania-pooh/master
Browse files Browse the repository at this point in the history
Switch back to explicitly specifying release version and automated ta…
  • Loading branch information
vania-pooh authored Oct 23, 2021
2 parents a0a7964 + 9022f89 commit 3edf42b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: release

on:
release:
types: [published]
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
default: "X.Y.Z"

jobs:
lightning-java:
Expand All @@ -22,9 +26,6 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSWORD

- name: Prepare release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV

- name: Deploy release
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand All @@ -33,9 +34,11 @@ jobs:
run: |
git config user.name $GITHUB_REPOSITORY
git config user.email "[email protected]"
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$RELEASE_VERSION
git commit -am "Updated version to $RELEASE_VERSION"
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.releaseVersion }}
git commit -am "Updated version to ${{ github.event.inputs.releaseVersion }}"
git push origin master
git tag ${{ github.event.inputs.releaseVersion }}
git push origin ${{ github.event.inputs.releaseVersion }}
mvn clean deploy -P release
mvn versions:set -DgenerateBackupPoms=false -DnextSnapshot=true
git commit -am "Updated version to next snapshot"
Expand Down

0 comments on commit 3edf42b

Please sign in to comment.