Skip to content

Commit 0269115

Browse files
committed
build: release to pypi
1 parent bbb6260 commit 0269115

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/release-pypi.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# - https://github.com/pypa/gh-action-pypi-publish
12
name: Publish package to PyPI
23

34
on:
@@ -6,18 +7,22 @@ on:
67
- "v*"
78

89
jobs:
9-
publish:
10-
name: Publish
10+
pypi-publish:
11+
name: Upload release to PyPI
1112
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/project/ASGIWebDAV
16+
permissions:
17+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1218
steps:
19+
# retrieve your distributions here
1320
- uses: actions/checkout@v4
1421
- name: Install dependencies
1522
run: |
1623
python3 -m pip install -U -r requirements/pypi.txt
1724
- name: Build wheels
1825
run: |
1926
python -m build
20-
- name: Publish a Python distribution to PyPI
27+
- name: Publish package distributions to PyPI
2128
uses: pypa/gh-action-pypi-publish@release/v1
22-
with:
23-
password: ${{ secrets.PYPI_API_TOKEN }}

fabfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ def pypi_build(c):
9191

9292
@task
9393
def pypi_public(c):
94-
c.run(
95-
"python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*"
96-
)
94+
c.run("python -m twine upload dist/*")
9795

9896

9997
@task

0 commit comments

Comments
 (0)