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 1
1
# This workflows will upload a Python Package using Twine when a release is created
2
2
# 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
+ #
4
4
name : Upload Python Package
5
5
6
6
on :
@@ -13,18 +13,26 @@ jobs:
13
13
14
14
steps :
15
15
- uses : actions/checkout@v3
16
- - name : Set up Python
17
- uses : actions/setup-python@v3
16
+ - uses : actions/setup-python@v3
18
17
with :
19
18
python-version : " 3.x"
20
- - name : Install dependencies
19
+
20
+ - name : install build package
21
21
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
25
33
env :
26
- TWINE_USERNAME : " __token__"
34
+ TWINE_USERNAME : __token__
27
35
TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
28
36
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
5
5
6
6
on :
7
7
pull_request :
8
+ paths-ignore :
9
+ - " **.md"
10
+ - " **.yml"
11
+ - " **.yaml"
12
+ - " !.github/workflows/test.yml"
8
13
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 : ["**"]
9
23
workflow_dispatch :
10
24
11
25
jobs :
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/[email protected]
19
-
20
26
pytest :
21
27
name : " Run pytest"
22
28
runs-on : ubuntu-20.04
53
59
- name : Set up Python ${{ matrix.python-version }}
54
60
uses : actions/setup-python@v3
55
61
with :
56
- python-version : ${{ matrix.python-version }}
62
+ python-version : " ${{ matrix.python-version }}"
57
63
58
64
- name : Install dependencies
59
65
run : |
You can’t perform that action at this time.
0 commit comments