Skip to content

Commit c59db40

Browse files
authored
Switch PyPI release workflow to trusted publishing (#872)
* switch PyPI release workflow to trusted publishing * drop broken legacy windows test matrix
1 parent 1d16890 commit c59db40

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/main.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
python-version: [ "3.10", "3.11", "3.12"," 3.13" ]
37-
os: [ ubuntu-latest, windows-latest ]
37+
os: [ ubuntu-latest ]
3838

3939
runs-on: ${{ matrix.os }}
4040

@@ -150,4 +150,3 @@ jobs:
150150
shell: bash
151151
env:
152152
BIOPORTAL_API_KEY: ${{ secrets.BIOPORTAL_API_KEY }}
153-

.github/workflows/pypi-publish.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
name: Publish Python Package
22

33
on:
4+
workflow_dispatch:
45
release:
56
types: [created]
67

78
jobs:
89
build-n-publish:
910
name: Build and publish Python 🐍 distributions 📦 to PyPI
1011
runs-on: ubuntu-latest
12+
environment: release
13+
permissions:
14+
id-token: write
1115

1216
steps:
1317
- uses: actions/checkout@v6.0.2
1418
with:
1519
fetch-depth: 0
1620

21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7.3.0
23+
1724
- name: Set up Python
1825
uses: actions/setup-python@v6.2.0
1926
with:
@@ -31,7 +38,6 @@ jobs:
3138
! ls dist/oaklib-0.0.0* 1>/dev/null 2>&1
3239
3340
- name: Publish distribution 📦 to PyPI
34-
uses: pypa/gh-action-pypi-publish@v1.2.2
41+
uses: pypa/gh-action-pypi-publish@release/v1
3542
with:
36-
user: __token__
37-
password: ${{ secrets.pypi_password }}
43+
verbose: true

0 commit comments

Comments
 (0)