From f6b984ca4fc65cdf49c4ae8b95daa1f7f3900bd7 Mon Sep 17 00:00:00 2001 From: magicdawn Date: Fri, 18 Nov 2022 02:45:19 +0800 Subject: [PATCH] ci: v1.0.0 v.s 1.0.0 --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9eb737..8314b55 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,17 @@ jobs: # electron build - run: pnpm dist:mac + # v1.2.3 -> 1.2.3 + - id: github-script + uses: actions/github-script@v6 + with: + script: | + const version = context.ref.slice('refs/tags/v'.length) + core.setOutput('version', version) + + # use + # - run: echo "${{steps.github-script.outputs.id}}" + # create release & upload to release - name: Release uses: softprops/action-gh-release@v1 @@ -48,4 +59,4 @@ jobs: fail_on_unmatched_files: true files: | ./dist/latest-mac.yml - ./dist/clash-config-manager-${{ github.ref_name }}-*.* + ./dist/clash-config-manager-${{ steps.github-script.outputs.version }}-*.*