From 36ca94a22ae5879926711d1960d01921d2b96b3a Mon Sep 17 00:00:00 2001 From: Zachary Spar <41600414+zachspar@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:55:45 -0400 Subject: [PATCH] feat: add `new-release-git-tag` output variable (#7) --- .github/workflows/ci.yaml | 3 ++- README.md | 3 +++ index.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a27710e..6388398 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,7 @@ jobs: outputs: new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} + new-release-git-tag: ${{ steps.get-next-version.outputs.new-release-git-tag }} release: runs-on: ubuntu-latest @@ -37,7 +38,7 @@ jobs: if: needs.get-next-version.outputs.new-release-published == 'true' steps: - - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}" + - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }} with tag ${{ needs.get-next-version.outputs.new-release-git-tag }}" - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/README.md b/README.md index f8a8eab..3b4b83a 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ jobs: outputs: new-release-published: ${{ steps.get-next-version.outputs.new-release-published }} new-release-version: ${{ steps.get-next-version.outputs.new-release-version }} + new-release-git-tag: ${{ steps.get-next-version.outputs.new-release-git-tag }} build: runs-on: ubuntu-latest @@ -76,6 +77,8 @@ jobs: steps: - uses: actions/checkout@v3 - run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}" + - run: echo "The new release git tag is ${{ needs.get-next-version.outputs.new-release-git-tag }}" + release: runs-on: ubuntu-latest diff --git a/index.js b/index.js index 8dac1d9..569600b 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ function verifyConditions() { function generateNotes(_pluginConfig, { nextRelease }) { core.setOutput("new-release-published", "true"); core.setOutput("new-release-version", nextRelease.version); + core.setOutput("new-release-git-tag", nextRelease.gitTag); } module.exports = {