Browse Source

add release-version step

Yuki Takei 4 years ago
parent
commit
a6dba7f142
1 changed files with 8 additions and 2 deletions
  1. 8 2
      .github/workflows/draft-release.yml

+ 8 - 2
.github/workflows/draft-release.yml

@@ -12,7 +12,7 @@ jobs:
     runs-on: ubuntu-latest
 
     outputs:
-      RELEASE_VERSION: ${{ steps.package-json.outputs.packageVersion }}
+      CURRENT_VERSION: ${{ steps.package-json.outputs.packageVersion }}
       RELEASE_DRAFT_BODY: ${{ steps.release-drafter.outputs.body }}
 
     steps:
@@ -44,6 +44,12 @@ jobs:
         with:
           fetch-depth: 0
 
+      - name: Get release version
+        id: release-version
+        run: |
+          RELEASE_VERSION=`npx semver -i patch ${{ needs.update-release-draft.outputs.CURRENT_VERSION }}`
+          echo ::set-output name=RELEASE_VERSION::$RELEASE_VERSION
+
       - name: Create/Update Pull Request
         uses: bakunyo/git-pr-release-action@master
         env:
@@ -51,6 +57,6 @@ jobs:
           GIT_PR_RELEASE_BRANCH_PRODUCTION: release/current
           GIT_PR_RELEASE_BRANCH_STAGING: master
           GIT_PR_RELEASE_TEMPLATE: .github/git-pr-release-template.erb
-          GIT_PR_RELEASE_TITLE: Release ${{ needs.update-release-draft.outputs.RELEASE_VERSION }}
+          GIT_PR_RELEASE_TITLE: Release ${{ steps.release-version.outputs.RELEASE_VERSION }}
           GIT_PR_RELEASE_BODY: ${{ needs.update-release-draft.outputs.RELEASE_DRAFT_BODY }}