Skip to content

Commit 89ca86c

Browse files
committed
Migrate to trusted platform publishing
1 parent b2f16f0 commit 89ca86c

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

.github/workflows/publish.yml

+3-29
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,13 @@ on:
55
- created
66

77
jobs:
8-
test-publish:
9-
name: Test Publish
10-
runs-on:
11-
ubuntu-latest
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
python-version: [ "3.10" ]
16-
poetry-version: [ "1.4.2" ]
17-
os: [ ubuntu-latest ]
18-
steps:
19-
- uses: actions/checkout@v3
20-
- uses: actions/setup-python@v4
21-
with:
22-
python-version: ${{ matrix.python-version }}
23-
- name: Run image
24-
uses: abatilo/actions-poetry@v2
25-
with:
26-
poetry-version: ${{ matrix.poetry-version }}
27-
- name: Build Project
28-
run: poetry build
29-
- name: Upload release to PyPI Test
30-
uses: pypa/gh-action-pypi-publish@release/v1
31-
with:
32-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
33-
repository-url: https://test.pypi.org/legacy/
348
publish:
35-
needs: test-publish
369
name: Publish to PyPI
3710
runs-on:
3811
ubuntu-latest
12+
environment: pypi
13+
permissions:
14+
id-token: write
3915
strategy:
4016
fail-fast: false
4117
matrix:
@@ -55,5 +31,3 @@ jobs:
5531
run: poetry build
5632
- name: Upload release to PyPI
5733
uses: pypa/gh-action-pypi-publish@release/v1
58-
with:
59-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)