File tree Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Original file line number Diff line number Diff line change 1
1
# This workflow will upload a Python Package to PyPI when a release is published
2
2
# For more information see:
3
+ # - https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3
4
# - https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
4
- # - https://github.com/pypa/gh-action-pypi-publish
5
5
6
6
name : Upload Python Package
7
7
10
10
types : [published]
11
11
12
12
jobs :
13
- deploy :
14
- name : Build and publish to PyPI
13
+ build :
14
+ name : Build package
15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- name : Checkout code
18
18
uses : actions/checkout@v2
19
+ with :
20
+ fetch-depth : 0
19
21
- name : Set up Python
20
22
uses : actions/setup-python@v2
21
23
with :
22
24
python-version : " 3.x"
23
- - name : Install dependencies
25
+ - name : Install pypa/build
24
26
run : |
25
27
python -m pip install --upgrade pip
26
- pip install --upgrade setuptools wheel
27
- - name : Build
28
+ pip install --upgrade build
29
+ - name : Build package
28
30
run : |
29
- python setup.py sdist bdist_wheel
30
- - name : Publish to PyPI
31
+ python -m build
32
+ - name : Upload dist files
33
+ uses : actions/upload-artifact@v2
34
+ with :
35
+ name : dist-files
36
+ path : dist/
37
+ if-no-files-found : error
38
+ publish :
39
+ name : Publish to PyPI
40
+ needs : [build]
41
+ runs-on : ubuntu-latest
42
+ steps :
43
+ - name : Download dist files
44
+ uses : actions/download-artifact@v2
45
+ with :
46
+ name : dist-files
47
+ path : dist/
48
+ - name : Publish package to PyPI
31
49
uses : pypa/gh-action-pypi-publish@release/v1
32
50
with :
33
51
user : __token__
You can’t perform that action at this time.
0 commit comments