File tree Expand file tree Collapse file tree 1 file changed +30
-23
lines changed Expand file tree Collapse file tree 1 file changed +30
-23
lines changed Original file line number Diff line number Diff line change 1
- name : Upload Python Package
1
+ name : Publish on Tag
2
2
3
3
on :
4
- release :
5
- types : [published]
6
-
7
- permissions :
8
- contents : read
4
+ push :
5
+ tags :
6
+ - ' v*'
9
7
10
8
jobs :
11
- deploy :
9
+ publish :
12
10
runs-on : ubuntu-latest
11
+
13
12
steps :
14
- - uses : actions/checkout@v3
15
- - name : Set up Python
16
- uses : actions/setup-python@v3
17
- with :
18
- python-version : ' 3.x'
19
- - name : Install dependencies
20
- run : |
21
- python -m pip install --upgrade pip
22
- pip install build
23
- - name : Build package
24
- run : python -m build
25
- - name : Publish package
26
- uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
27
- with :
28
- user : __token__
29
- password : ${{ secrets.PYPI_API_TOKEN }}
13
+ - name : Check out code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Set up Python 3.9
17
+ uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.9'
20
+
21
+ - name : Install build & upload tools
22
+ run : |
23
+ python -m pip install --upgrade pip
24
+ pip install "setuptools<61" wheel build twine
25
+
26
+ - name : Build distributions
27
+ run : |
28
+ rm -rf build/ dist/ *.egg-info
29
+ python -m build
30
+
31
+ - name : Publish to PyPI
32
+ env :
33
+ TWINE_USERNAME : __token__
34
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
35
+ run : |
36
+ twine upload dist/*
You can’t perform that action at this time.
0 commit comments