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 - ' libCacheSim-node/**'
1111
1212permissions :
13- contents : read # Default permission for reading repository contents
13+ contents : read # 读取仓库内容
14+ actions : read # 读取 artifacts(如果需要)
1415
1516env :
1617 BUILD_TYPE : Release
Original file line number Diff line number Diff line change 11name : Python Package
22
33on :
4- push :
5- branches : ["*"]
6- pull_request :
7- branches : ["*"]
84 release :
95 types : [published]
106 workflow_dispatch : # Allow manual triggering
117
8+ permissions :
9+ contents : read
10+ actions : read
11+ id-token : write
12+
1213jobs :
1314 build-wheels :
1415 name : Build wheels on ${{ matrix.os }}
@@ -103,7 +104,7 @@ jobs:
103104 name : Publish to PyPI
104105 needs : [build-wheels, build-sdist]
105106 runs-on : ubuntu-latest
106- # if: github.event_name == 'release' && github.event.action == 'published'
107+ if : github.event_name == 'release' && github.event.action == 'published'
107108 environment :
108109 name : pypi
109110 url : https://pypi.org/p/libcachesim
@@ -133,6 +134,7 @@ jobs:
133134 name : Publish to TestPyPI
134135 needs : [build-wheels, build-sdist]
135136 runs-on : ubuntu-latest
137+ if : github.event_name == 'workflow_dispatch'
136138 environment :
137139 name : testpypi
138140 url : https://test.pypi.org/p/libcachesim
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: Python
22
33on : [push, pull_request]
44
5+ permissions :
6+ contents : read # 读取仓库内容
7+
58jobs :
69 build :
710 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments