File tree Expand file tree Collapse file tree 2 files changed +33
-19
lines changed Expand file tree Collapse file tree 2 files changed +33
-19
lines changed Original file line number Diff line number Diff line change 11# This workflows will upload a Python Package using Twine when a release is created
22# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
3+ #
44name : Upload Python Package
55
66on :
@@ -13,18 +13,26 @@ jobs:
1313
1414 steps :
1515 - uses : actions/checkout@v3
16- - name : Set up Python
17- uses : actions/setup-python@v3
16+ - uses : actions/setup-python@v3
1817 with :
1918 python-version : " 3.x"
20- - name : Install dependencies
19+
20+ - name : install build package
2121 run : |
22- python -m pip install --upgrade pip
23- pip install setuptools wheel twine
24- - name : Build and publish
22+ pip install --upgrade pip
23+ pip install build
24+ pip freeze
25+
26+ - name : build release
27+ run : |
28+ python -m build --sdist --wheel .
29+ ls -l dist
30+ sha256sum dist/* | tee SHA256SUMS
31+
32+ - name : Publish to PyPI
2533 env :
26- TWINE_USERNAME : " __token__"
34+ TWINE_USERNAME : __token__
2735 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
2836 run : |
29- python setup.py sdist bdist_wheel
30- twine upload dist/*
37+ pip install twine
38+ twine upload --skip-existing dist/*
Original file line number Diff line number Diff line change @@ -5,18 +5,24 @@ name: Test
55
66on :
77 pull_request :
8+ paths-ignore :
9+ - " **.md"
10+ - " **.yml"
11+ - " **.yaml"
12+ - " !.github/workflows/test.yml"
813 push :
14+ paths-ignore :
15+ - " **.md"
16+ - " **.yml"
17+ - " **.yaml"
18+ - " !.github/workflows/test.yml"
19+ branches-ignore :
20+ - " dependabot/**"
21+ - " pre-commit-ci-update-config"
22+ tags : ["**"]
923 workflow_dispatch :
1024
1125jobs :
12- pre-commit :
13- name : Run pre-commit
14- runs-on : ubuntu-20.04
15- steps :
16- - uses : actions/checkout@v3
17- - uses : actions/setup-python@v3
18- - uses : pre-commit/action@v2.0.3
19-
2026 pytest :
2127 name : " Run pytest"
2228 runs-on : ubuntu-20.04
5359 - name : Set up Python ${{ matrix.python-version }}
5460 uses : actions/setup-python@v3
5561 with :
56- python-version : ${{ matrix.python-version }}
62+ python-version : " ${{ matrix.python-version }}"
5763
5864 - name : Install dependencies
5965 run : |
You can’t perform that action at this time.
0 commit comments