From d955668598fc9f46c1e6d063d835c63de972b249 Mon Sep 17 00:00:00 2001 From: wood chen Date: Fri, 21 Mar 2025 20:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20GitHub=20=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=AD=98=E5=9C=A8=E6=80=A7=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E5=B9=B6=E6=94=AF=E6=8C=81=E5=B0=86=E5=8F=91=E5=B8=83=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=E4=B8=BA=E8=8D=89=E7=A8=BF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f9362b..05d762b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,12 +73,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release create "${{ steps.version.outputs.tag }}" \ - --title="${{ steps.version.outputs.tag }}" \ - --notes "Release ${{ steps.version.outputs.tag }}" \ - ${{ env.PLUGIN_NAME }}-${{ steps.version.outputs.version }}.zip \ - main.js \ - manifest.json \ - $([ -f "styles.css" ] && echo "styles.css") \ - source-code.zip \ - source-code.tar.gz + tag="${GITHUB_REF#refs/tags/}" + + files=() + for file in main.js manifest.json; do + if [ -f "$file" ]; then + files+=("$file") + else + echo "Warning: $file not found" + exit 1 + fi + done + + gh release create "$tag" \ + --title="$tag" \ + --draft \ + "${files[@]}"