diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bdd67a..5d8ad8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,12 @@ on: push: tags: - "v*" + workflow_dispatch: + inputs: + release_tag: + description: "要发布的 tag(例如 v1.2.3,必须已存在)" + required: true + type: string permissions: contents: write @@ -25,6 +31,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag || github.ref }} - name: Ensure Tag Commit Is On Default Branch env: