Skip to content

Commit 4665277

Browse files
committed
publish via trusted publishers
1 parent 5e13f56 commit 4665277

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ concurrency:
2020

2121
jobs:
2222
build-release:
23-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-22.04
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: actions/setup-python@v5
2727
with:
28-
python-version: 3.8
28+
python-version: 3.11
29+
cache: pip
2930

3031
- name: install build package
3132
run: |
@@ -41,7 +42,7 @@ jobs:
4142
- name: verify wheel
4243
run: |
4344
cd dist
44-
pip install ./*.whl jupyterlab==3.*
45+
pip install ./*.whl jupyterlab==4.*
4546
ipcluster --help-all
4647
ipcontroller --help-all
4748
ipengine --help-all
@@ -55,11 +56,18 @@ jobs:
5556
path: "dist/*"
5657
if-no-files-found: error
5758

58-
- name: Publish to PyPI
59-
if: startsWith(github.ref, 'refs/tags/')
60-
env:
61-
TWINE_USERNAME: __token__
62-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
63-
run: |
64-
pip install twine
65-
twine upload --skip-existing dist/*
59+
upload-pypi:
60+
permissions:
61+
id-token: write
62+
environment: release
63+
runs-on: ubuntu-22.04
64+
if: startsWith(github.ref, 'refs/tags/')
65+
needs:
66+
- build-release
67+
steps:
68+
- uses: actions/download-artifact@v4
69+
with:
70+
path: dist
71+
merge-multiple: true
72+
- name: Publish wheels to PyPI
73+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)