From 67046fecf0b28db9af1c221e74921e2a2caf1bec Mon Sep 17 00:00:00 2001 From: "@a-ng-d" Date: Sun, 22 Sep 2024 01:57:45 +0200 Subject: [PATCH] Refactor release.yml to extract local tag for tag_name and release_name --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 301e89d5..326fa6aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,14 +21,20 @@ jobs: with: fetch-depth: 0 + - name: Extract local tag + id: extract_tag + run: | + local_tag=$(git tag --points-at HEAD | head -n 1) + echo "::set-output name=local_tag::$local_tag" + - name: Create release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref_name }} - release_name: Release ${{ github.ref_name }} + tag_name: ${{ steps.extract_tag.outputs.local_tag }} + release_name: Release ${{ steps.extract_tag.outputs.local_tag }} body: | ## What's Changed [Friendly release note](https://ui-color-palette.canny.io/changelog/${{ github.ref_name }})・[Full Changelog](https://github.com/inVoltag/figma-ui-color-palette/commits/${{ github.ref_name }})