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 : Publish Python distribution to PyPI
2+
3+ on : push
4+
5+ jobs :
6+ build :
7+ runs-on : ubuntu-22.04
8+
9+ steps :
10+ - uses : actions/checkout@v4
11+ with :
12+ submodules : true
13+
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : " 3.x"
18+
19+ - name : Install cibuildwheel
20+ run : python3 -m pip install cibuildwheel==2.16.4
21+
22+ - name : Build wheels
23+ run : python -m cibuildwheel --output-dir dist/
24+
25+ - name : Store the distribution packages
26+ uses : actions/upload-artifact@v4
27+ with :
28+ name : python-package-distributions
29+ path : dist/*.whl
30+
31+ publish-to-pypi :
32+ needs : [build]
33+ runs-on : ubuntu-latest
34+
35+ # Only publish to PyPI on tag pushes
36+ if : startsWith(github.ref, 'refs/tags/')
37+
38+ environment :
39+ name : pypi
40+ url : https://pypi.org/p/yara-python
41+ permissions :
42+ id-token : write # IMPORTANT: mandatory for trusted publishing
43+
44+ steps :
45+ - name : Download all the dists
46+ uses : actions/download-artifact@v4
47+ with :
48+ name : python-package-distributions
49+ path : dist/
50+
51+ - name : Publish distribution to PyPI
52+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments