File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ # always build releases (to make sure wheel-building works)
4+ # but only publish to PyPI on tags
5+ on :
6+ pull_request :
7+ paths-ignore :
8+ - " docs/**"
9+ - " .github/workflows/**"
10+ - " !.github/workflows/release.yaml"
11+ push :
12+ paths-ignore :
13+ - " docs/**"
14+ - " .github/workflows/**"
15+ - " !.github/workflows/release.yaml"
16+ branches-ignore :
17+ - " dependabot/**"
18+ - " pre-commit-ci-update-config"
19+ tags :
20+ - " **"
21+ workflow_dispatch :
22+
23+ jobs :
24+ build-release :
25+ runs-on : ubuntu-20.04
26+ steps :
27+ - uses : actions/checkout@v3
28+ - uses : actions/setup-python@v4
29+ with :
30+ python-version : " 3.10"
31+
32+ - name : install build package
33+ run : |
34+ pip install --upgrade pip
35+ pip install build
36+ pip freeze
37+
38+ - name : build release
39+ run : |
40+ python -m build --sdist --wheel .
41+ ls -l dist
42+
43+ - name : publish to pypi
44+ uses : pypa/gh-action-pypi-publish@v1.4.1
45+ if : startsWith(github.ref, 'refs/tags/')
46+ with :
47+ user : __token__
48+ password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments