From 349feac519397c40d7a42fef3b5a4ee9c8a6217e Mon Sep 17 00:00:00 2001 From: duanfuxiang Date: Mon, 6 Jan 2025 21:28:43 +0800 Subject: [PATCH] update github release --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69e0875..94da13b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,20 +31,24 @@ jobs: run: | npm run test + - name: Get Tag Name + id: get_tag + run: | + echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT + - name: Bundle id: bundle run: | mkdir ${{ env.PLUGIN_NAME }} cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }} - zip -r ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip ${{ env.PLUGIN_NAME }} + zip -r ${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip ${{ env.PLUGIN_NAME }} ls - echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT - name: Get release notes id: release_notes run: | chmod +x .github/scripts/get-changelog.js - CHANGELOG=$(node .github/scripts/get-changelog.js ${{ steps.bundle.outputs.tag_name }}) + CHANGELOG=$(node .github/scripts/get-changelog.js ${{ steps.get_tag.outputs.tag_name }}) if [ -z "$CHANGELOG" ]; then echo "Error: No release notes found for this version in CHANGELOG.md" exit 1 @@ -59,7 +63,7 @@ jobs: with: token: ${{ github.token }} files: | - ${{ env.PLUGIN_NAME }}-${{ steps.bundle.outputs.tag_name }}.zip + ${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip main.js manifest.json styles.css