File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : read
9+ id-token : write # 必须启用用于 PyPI Trusted Publishing
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v5
20+ with :
21+ python-version : " 3.x"
22+
23+ - name : Install build tool
24+ run : python -m pip install --upgrade build
25+
26+ - name : Build distributions
27+ run : python -m build
28+
29+ - name : Upload build artifacts
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : release-dists
33+ path : dist/
34+
35+ publish :
36+ runs-on : ubuntu-latest
37+ needs : build
38+ environment :
39+ name : pypi
40+ url : https://pypi.org/project/qsnctf/
41+
42+ steps :
43+ - name : Download build artifacts
44+ uses : actions/download-artifact@v4
45+ with :
46+ name : release-dists
47+ path : dist/
48+
49+ - name : Publish to PyPI
50+ uses : pypa/gh-action-pypi-publish@release/v1
51+ with :
52+ packages-dir : dist/
You can’t perform that action at this time.
0 commit comments