Skip to content

Commit 63b5045

Browse files
authored
Change PyPI deploy to rely on "trusted publishers" (#3400)
1 parent abb133f commit 63b5045

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

.github/workflows/deploy-release.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
name: deploy-release
2-
1+
name: Deploy release
32
on:
43
push:
54
tags:
6-
- '*'
7-
5+
- '*'
86
jobs:
97
pypi:
8+
permissions:
9+
id-token: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- name: Setup Python
1414
uses: actions/setup-python@v4
1515
with:
16-
python-version: '3.10'
17-
- name: Install Hatch
18-
run: |
19-
python -m pip install -U hatch
16+
python-version: '3.11'
17+
- name: Install dependencies
18+
run: pip install -U build
2019
- name: Build package
21-
run: |
22-
hatch build
23-
- name: Publish
24-
run: |
25-
hatch publish
26-
env:
27-
HATCH_INDEX_USER: __token__
28-
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
20+
run: python -m build
21+
- name: Publish to PyPI
22+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)