File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Python Wheels
2
+
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+ tags :
7
+ - " **"
8
+ pull_request :
9
+ workflow_dispatch :
10
+
11
+ concurrency :
12
+ group : wheels-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ defaults :
16
+ run :
17
+ shell : bash -eux {0}
18
+
19
+ jobs :
20
+
21
+ build_dist :
22
+ name : Build Distribution Files
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+ with :
27
+ fetch-depth : 0
28
+ persist-credentials : false
29
+
30
+ - uses : actions/setup-python@v5
31
+ with :
32
+ # Build sdist on lowest supported Python
33
+ python-version : ' 3.9'
34
+
35
+ - name : Install build
36
+ run : |
37
+ python -m pip install build
38
+
39
+ - name : build the dist files
40
+ run : |
41
+ python -m build .
42
+
43
+ - name : Upload the dist files
44
+ uses : actions/upload-artifact@v4
45
+ with :
46
+ name : dist-${{ github.run_id }}
47
+ path : ./dist/*.*
48
+
49
+ publish :
50
+ # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi
51
+ needs : [build_dist]
52
+ if : startsWith(github.ref, 'refs/tags/')
53
+ runs-on : ubuntu-latest
54
+ environment : release
55
+ permissions :
56
+ id-token : write
57
+ steps :
58
+ - name : Download the dists
59
+ uses : actions/download-artifact@v4
60
+ with :
61
+ name : dist-${{ github.run_id }}
62
+ path : dist/
63
+ - name : Publish distribution 📦 to PyPI
64
+ uses : pypa/gh-action-pypi-publish@release/v1
65
+ with :
66
+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments