Skip to content

Commit b2d0fab

Browse files
committed
Use trusted publishing
1 parent 17036ce commit b2d0fab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ on:
66

77
jobs:
88
publish-to-pypi:
9-
name: Publish to pypi
10-
runs-on: ubuntu-latest
9+
environment:
10+
name: pypi
11+
url: https://pypi.org/p/pydocstringformatter
12+
permissions:
13+
id-token: write
1114
steps:
1215
- name: Check out code from GitHub
1316
uses: actions/[email protected]
14-
- name: Set up Python 3.11
17+
- name: Set up Python 3.x
1518
uses: actions/setup-python@v5
1619
with:
17-
python-version: "3.11"
20+
python-version: "3.x"
1821
- name: Install dependencies
1922
run: |
20-
pip install -U -r requirements.txt
21-
pip install -U build
23+
pip install -r requirements.txt
24+
pip install build
2225
- name: Build package
2326
run: python -m build
2427
- name: Publish to PyPI
2528
uses: pypa/gh-action-pypi-publish@release/v1
26-
with:
27-
user: __token__
28-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)