File tree 2 files changed +17
-24
lines changed
2 files changed +17
-24
lines changed Original file line number Diff line number Diff line change 1
1
name : Upload Python Package
2
2
3
3
on :
4
- # Only run when a release is created
5
4
release :
6
- types : [created ]
5
+ types : [published ]
7
6
8
7
jobs :
9
8
deploy :
10
9
runs-on : ubuntu-latest
10
+ permissions :
11
+ # IMPORTANT: this permission is mandatory for trusted publishing
12
+ id-token : write
11
13
steps :
12
- - uses : actions/checkout@v1
13
- - name : Set up Python
14
- uses : actions/setup-python@v1
15
- with :
16
- python-version : ' 3.x'
17
- - name : Install dependencies
18
- run : |
19
- python -m pip install --upgrade pip
20
- pip install setuptools wheel twine
21
- - name : Build and publish
22
- env :
23
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
24
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
25
- run : |
26
- python setup.py sdist bdist_wheel
27
- twine upload dist/*
14
+ - uses : actions/checkout@v3
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v4
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 --sdist --wheel
25
+ - name : Publish package
26
+ uses : pypa/gh-action-pypi-publish@release/v1
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments