File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 build :
1111 runs-on : ubuntu-latest
1212
13+ # 显式声明权限
14+ permissions :
15+ contents : write # 允许创建 Release
16+
1317 steps :
1418 - uses : actions/checkout@v4
1519
4044 echo "VERSION=${VERSION}" >> $GITHUB_ENV
4145 echo "版本信息: ${VERSION}"
4246
47+ - name : List files in dist/
48+ run : ls -la dist/
49+
4350 - name : Upload wheel package
4451 uses : actions/upload-artifact@v4
4552 with :
@@ -50,10 +57,13 @@ jobs:
5057 overwrite : false
5158
5259 - name : Create Release
53- uses : softprops/action-gh-release@v1
54- if : startsWith(github.ref, 'refs/tags/')
60+ uses : softprops/action-gh-release@v2 # 升级到 v2
61+ env :
62+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # 显式传递 Token
5563 with :
56- files : dist/*.whl
64+ files : |
65+ dist/*.whl
66+ LICENSE
5767 tag_name : ${{ github.ref }}
5868 name : Version ${{ env.VERSION }} - Stable Release
5969 body : |
6474 ### Build Details:
6575 - Built from tag: ${{ github.ref }}
6676 draft : false
67- prerelease : false
77+ prerelease : false
78+ overwrite : true # 允许覆盖已存在的 Release
You can’t perform that action at this time.
0 commit comments