File tree Expand file tree Collapse file tree 3 files changed +62
-31
lines changed
Expand file tree Collapse file tree 3 files changed +62
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Build and upload to PyPI
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ push :
7+ branches :
8+ - main
9+ release :
10+ types :
11+ - published
12+
13+ jobs :
14+ build_wheels :
15+ name : Build wheels on ${{ matrix.os }}
16+ runs-on : ${{ matrix.os }}
17+ strategy :
18+ matrix :
19+ os : [macos-latest, ubuntu-latest, windows-latest]
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+ with :
24+ submodules : true
25+
26+ - name : Build wheels
27+ uses : pypa/cibuildwheel@v2.16.2
28+ env :
29+ CIBW_BUILD_VERBOSITY : 1
30+ MAXMINDDB_REQUIRE_EXTENSION : 1
31+
32+ - uses : actions/upload-artifact@v3
33+ with :
34+ path : ./wheelhouse/*.whl
35+
36+ build_sdist :
37+ name : Build source distribution
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v4
41+
42+ - name : Build sdist
43+ run : pipx run build --sdist
44+
45+ - uses : actions/upload-artifact@v3
46+ with :
47+ path : dist/*.tar.gz
48+
49+ upload_pypi :
50+ needs : [build_wheels, build_sdist]
51+ runs-on : ubuntu-latest
52+ environment : release
53+ permissions :
54+ id-token : write
55+ if : github.event_name == 'release' && github.event.action == 'published'
56+ steps :
57+ - uses : actions/download-artifact@v3
58+ with :
59+ name : artifact
60+ path : dist
61+
62+ - uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -63,8 +63,3 @@ git push
6363gh release create --target " $( git branch --show-current) " -t " $version " -n " $notes " " $tag "
6464
6565git push --tags
66-
67- rm -fr build dist
68- python -m sphinx -M html ./docs ./build/sphinx -W
69- python setup.py sdist
70- twine upload dist/*
You can’t perform that action at this time.
0 commit comments