Skip to content

Commit 2952ca3

Browse files
committed
fix: 改为github release
1 parent ef5bc4c commit 2952ca3

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

.github/workflows/CI.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- main
1212
- master
1313
tags:
14-
- '*'
14+
- "*"
1515
pull_request:
1616
workflow_dispatch:
1717

@@ -191,8 +191,9 @@ jobs:
191191
release:
192192
name: Release
193193
runs-on: ubuntu-latest
194-
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
195-
needs: [linux, musllinux, windows, macos, sdist]
194+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name ==
195+
'workflow_dispatch' }}
196+
needs: [ linux, musllinux, windows, macos, sdist ]
196197
permissions:
197198
# Use to sign the release artifacts
198199
id-token: write
@@ -205,12 +206,20 @@ jobs:
205206
- name: Generate artifact attestation
206207
uses: actions/attest-build-provenance@v3
207208
with:
208-
subject-path: 'wheels-*/*'
209-
- name: Install uv
210-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
211-
uses: astral-sh/setup-uv@v7
212-
- name: Publish to PyPI
213-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
214-
run: uv publish 'wheels-*/*'
209+
subject-path: "wheels-*/*"
210+
# - name: Install uv
211+
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
212+
# uses: astral-sh/setup-uv@v7
213+
# - name: Publish to PyPI
214+
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
215+
# run: uv publish 'wheels-*/*'
216+
- name: Create GitHub Release
217+
uses: softprops/action-gh-release@v2
218+
if: startsWith(github.ref, 'refs/tags/')
219+
with:
220+
# 同样使用通配符,确保抓取所有子文件夹里的 whl 和 sdist
221+
files: wheels-*/*
222+
generate_release_notes: true
215223
env:
216-
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
224+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
225+
# UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)