Skip to content

Commit e314b40

Browse files
committed
[skip ci] Switch to trusted publishing for pypi
1 parent a845959 commit e314b40

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/publish.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ env:
2323
jobs:
2424
publish:
2525
runs-on: ubuntu-22.04
26+
environment:
27+
name: publish
28+
url: https://pypi.org/pydvl
2629
concurrency:
2730
group: publish
31+
permissions:
32+
id-token: write
2833
steps:
2934
- name: Checking out last commit in release
3035
if: ${{ github.event_name != 'workflow_dispatch' }}
@@ -54,6 +59,11 @@ jobs:
5459
# Make the version available as env variable for next steps
5560
echo CURRENT_VERSION=$CURRENT_VERSION >> $GITHUB_ENV
5661
shell: bash
62+
- name: Build dist
63+
run: |
64+
python setup.py sdist bdist_wheel
65+
- name: Publish to PyPI
66+
uses: pypa/gh-action-pypi-publish@release/v1
5767
- name: Deploy Docs
5868
uses: ./.github/actions/deploy-docs
5969
with:
@@ -63,10 +73,3 @@ jobs:
6373
email: ${{ env.GITHUB_BOT_EMAIL }}
6474
username: ${{ env.GITHUB_BOT_USERNAME }}
6575
set-default: 'true'
66-
- name: Build and publish to PyPI
67-
env:
68-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
69-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
70-
run: |
71-
python setup.py sdist bdist_wheel
72-
twine upload --verbose --non-interactive dist/*

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ pytest-sugar
1818
pytest-rerunfailures
1919
nbmake
2020
wheel
21-
twine==5.1.1

0 commit comments

Comments
 (0)