File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed
Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change 11name : Publish
22
3- # pypi trusted publishing via OIDC
4- permissions :
5- id-token : write
6-
73on :
84 pull_request :
9- branches : [ main , dev ]
5+ branches : [ master , dev ]
106 push :
117 tags :
128 - ' v*.*.*'
1511jobs :
1612 build :
1713 runs-on : ubuntu-22.04
18- environment : release-dev
19-
2014 steps :
2115 - name : Checkout code
2216 uses : actions/checkout@v4
@@ -35,11 +29,27 @@ jobs:
3529 - name : Show artifacts
3630 run : ls -lh ./dist
3731
38- - uses : actions/upload-artifact@v4
32+ - name : Upload artifacts
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : built-artifacts
36+ path : ./dist/*
37+
38+ publish :
39+ runs-on : ubuntu-22.04
40+ needs : build
41+ environment : release-dev
42+ # pypi trusted publishing via OIDC
43+ permissions :
44+ id-token : write
45+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
46+ steps :
47+ - name : Download all artifacts
48+ uses : actions/download-artifact@v4
3949 with :
40- name : dist-${{ matrix.os }}-${{ strategy.job-index }}
41- path : ./dist/*.whl
50+ pattern : built-*
51+ path : dist
52+ merge-multiple : true
4253
4354 - name : Publish package
4455 uses : pypa/gh-action-pypi-publish@release/v1
45- if : startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
You can’t perform that action at this time.
0 commit comments