Skip to content

Commit 8e6ed48

Browse files
committed
use OIDC trusted publishing in PyPI for biosim-client
1 parent c0fd756 commit 8e6ed48

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/on-release-main.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/biosim-client
14+
permissions:
15+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1116
steps:
1217
- name: Check out
1318
uses: actions/checkout@v4
@@ -19,14 +24,15 @@ jobs:
1924
id: vars
2025
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
2126

22-
- name: Build and publish
27+
- name: Build
2328
run: |
2429
source .venv/bin/activate
2530
poetry version $RELEASE_VERSION
26-
make build-and-publish
27-
env:
28-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
29-
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
31+
poetry build
32+
33+
- name: Publish package distributions to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
3036
deploy-docs:
3137
needs: publish
3238
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)