Skip to content

Commit f0d3f39

Browse files
Changed to publish with trusted publisher. Removed setup.py usage (#1702)
1 parent 1960fa0 commit f0d3f39

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ jobs:
1111
matrix:
1212
python-version: ['3.12']
1313

14+
environment:
15+
name: PyPI
16+
url: https://pypi.org/p/pypesto
17+
18+
permissions:
19+
id-token: write
20+
1421
steps:
1522
- name: Check out repository
1623
uses: actions/checkout@v6
@@ -25,15 +32,14 @@ jobs:
2532
with:
2633
python-version: ${{ matrix.python-version }}
2734

28-
- name: Install dependencies
35+
- name: dependencies
2936
run: |
3037
python -m pip install --upgrade pip
31-
pip install setuptools wheel twine
38+
python -m pip install -U build
3239
33-
- name: Build and publish
34-
env:
35-
TWINE_USERNAME: __token__
36-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
37-
run: |
38-
python setup.py sdist bdist_wheel
39-
twine upload dist/*
40+
- name: Build distribution
41+
run:
42+
python -m build
43+
44+
- name: Publish a Python distribution to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)