From 68c3625226bbc44fcafc6e8e3c9d22ea0f34002d Mon Sep 17 00:00:00 2001 From: Thierry Onkelinx Date: Wed, 7 Jun 2023 10:15:31 +0200 Subject: [PATCH] update release GHA --- .github/workflows/release.yml | 9 ++++++--- inst/package_template/release.yml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8445d7a5..3b2f57d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,10 +19,13 @@ jobs: - uses: actions/checkout@v3 - name: Get tag message run: | - TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)') - echo "::set-output name=TAG_BODY::$TAG_BODY" + TAG=$(git tag --contains $(git rev-parse HEAD)) + TAG_BODY=$(git tag --contains {{ github.sha }} -n100 | awk '(NR>1)') + echo "TAG=$TAG" >> $GITHUB_OUTPUT + echo "TAG_BODY=$TAG_BODY" >> $GITHUB_OUTPUT id: tag-body - uses: ncipollo/release-action@v1 with: - name: Release ${{ github.ref }} + name: Release ${{ steps.tag-body.outputs.TAG }} + tag: ${{ steps.tag-body.outputs.TAG }} body: ${{ steps.tag-body.outputs.TAG_BODY }} diff --git a/inst/package_template/release.yml b/inst/package_template/release.yml index 8445d7a5..3b2f57d3 100644 --- a/inst/package_template/release.yml +++ b/inst/package_template/release.yml @@ -19,10 +19,13 @@ jobs: - uses: actions/checkout@v3 - name: Get tag message run: | - TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)') - echo "::set-output name=TAG_BODY::$TAG_BODY" + TAG=$(git tag --contains $(git rev-parse HEAD)) + TAG_BODY=$(git tag --contains {{ github.sha }} -n100 | awk '(NR>1)') + echo "TAG=$TAG" >> $GITHUB_OUTPUT + echo "TAG_BODY=$TAG_BODY" >> $GITHUB_OUTPUT id: tag-body - uses: ncipollo/release-action@v1 with: - name: Release ${{ github.ref }} + name: Release ${{ steps.tag-body.outputs.TAG }} + tag: ${{ steps.tag-body.outputs.TAG }} body: ${{ steps.tag-body.outputs.TAG_BODY }}