File tree Expand file tree Collapse file tree 1 file changed +19
-34
lines changed Expand file tree Collapse file tree 1 file changed +19
-34
lines changed Original file line number Diff line number Diff line change 5
5
6
6
name : Pypi Release
7
7
8
- on :
8
+ on :
9
9
release :
10
10
types : [created]
11
11
12
12
jobs :
13
- build :
14
- name : Build distribution
15
- runs-on : ubuntu-latest
16
-
17
- steps :
18
- - uses : actions/checkout@v4
19
- - uses : actions/setup-python@v5
20
- with :
21
- python-version : " 3.x"
22
- - name : Install Dependency
23
- run : python -m pip install -U build
24
- - name : Build Distribution Pakcage
25
- run : python -m build
26
- - name : Store the distribution packages
27
- uses : actions/upload-artifact@v4
28
- with :
29
- name : python-package-distributions
30
- path : dist/
13
+ deploy :
31
14
32
- publish-to-pypi :
33
- name : Publish to PyPI
34
- needs :
35
- - build
36
15
runs-on : ubuntu-latest
37
- environment :
38
- name : pypi
39
16
40
17
steps :
41
- - name : Download all the dists
42
- uses : actions/download-artifact@v4
43
- with :
44
- name : python-package-distributions
45
- path : dist/
46
- - name : Publish distribution to PyPI
47
- uses : pypa/gh-action-pypi-publish@release/v1
18
+ - uses : actions/checkout@v4
19
+ - name : Set up Python
20
+ uses : actions/setup-python@v5
48
21
with :
49
- username : __token__
50
- password : ${{ secrets.PYPI_TOKEN }}
22
+ python-version : ' 3.10'
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install build twine
27
+ - name : Build and publish
28
+ env :
29
+ TWINE_USERNAME : ${{ secrets. PYPI_USERNAME }}
30
+ TWINE_PASSWORD : ${{ secrets. PYPI_PASSWORD }}
31
+ RELEASE : 1
32
+
33
+ run : |
34
+ python -m build
35
+ twine upload dist/* --verbose
You can’t perform that action at this time.
0 commit comments