From 9ebab8270cad76b75c76aa1ec761632f27bd554c Mon Sep 17 00:00:00 2001 From: Yeomai Date: Sat, 17 Oct 2026 10:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20.github/workflows/release.?= =?UTF-8?q?yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除release工作流 --- .github/workflows/release.yml | 71 ----------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 50a9cb4..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: GitHub Release - -on: - push: - tags: - - 'v*' - workflow_dispatch: - inputs: - tag: - description: '要发布 Release 的标签(如 v1.0.1)' - required: true - type: string - -permissions: - contents: write - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} - - - name: Setup Node - uses: actions/setup-node@v6 - with: - node-version: 22 - cache: npm - - - name: Install npm 11 - run: npm install -g npm@11.12.1 - - - name: Install dependencies - run: npm ci - - - name: Extract release notes from CHANGELOG - id: notes - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - TAG="${{ inputs.tag }}" - else - TAG="${GITHUB_REF#refs/tags/}" - fi - VERSION="${TAG#v}" - BODY_FILE="${RUNNER_TEMP}/release-notes.md" - awk -v ver="$VERSION" ' - /^## \[/ { - if (found) exit - if ($0 ~ "\\[" ver "\\]") found = 1 - next - } - found { print } - ' CHANGELOG.md > "$BODY_FILE" - if [ ! -s "$BODY_FILE" ]; then - echo "未在 CHANGELOG.md 找到版本 ${VERSION},使用自动生成说明。" >&2 - echo "## PicHost ${TAG}" > "$BODY_FILE" - fi - echo "tag=${TAG}" >> "$GITHUB_OUTPUT" - echo "body_path=${BODY_FILE}" >> "$GITHUB_OUTPUT" - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ steps.notes.outputs.tag }} - name: PicHost ${{ steps.notes.outputs.tag }} - body_path: ${{ steps.notes.outputs.body_path }} - draft: false - prerelease: false - make_latest: true