From bdb4fb3745633cc27e05d4675d4f6d72fa3e9814 Mon Sep 17 00:00:00 2001 From: "@a-ng-d" Date: Sun, 22 Sep 2024 02:10:51 +0200 Subject: [PATCH] Refactor release.yml to extract package version and update create_release job ID --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 326fa6aa..478b1c5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,11 +21,11 @@ jobs: with: fetch-depth: 0 - - name: Extract local tag - id: extract_tag + - name: Extract package version + id: extract_version run: | - local_tag=$(git tag --points-at HEAD | head -n 1) - echo "::set-output name=local_tag::$local_tag" + package_version=$(jq -r '.version' package.json) + echo "::set-output name=package_version::$package_version" - name: Create release id: create_release @@ -33,8 +33,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.extract_tag.outputs.local_tag }} - release_name: Release ${{ steps.extract_tag.outputs.local_tag }} + tag_name: v${{ steps.extract_version.outputs.package_version }} + release_name: Release ${{ steps.extract_version.outputs.package_version }} 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 }})