Skip to content

Commit 3528234

Browse files
Update CI/CD
1 parent a153847 commit 3528234

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,30 @@ on:
66
- published
77

88
jobs:
9-
build-and-publish:
9+
build-n-publish:
1010
name: Build and publish to PyPI
1111
runs-on: ubuntu-latest
12-
environment: release
13-
permissions:
14-
# IMPORTANT: this permission is mandatory for trusted publishing
15-
id-token: write
16-
1712
steps:
18-
- name: Checkout source code
19-
uses: actions/checkout@v4
20-
21-
- name: Set up Python
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.12
2215
uses: actions/setup-python@v4
2316
with:
2417
python-version: "3.12"
25-
2618
- name: Install pypa/build
2719
run: >-
2820
python -m
2921
pip install
3022
build
3123
--user
32-
3324
- name: Build a binary wheel and a source tarball
3425
run: >-
35-
python -m
36-
build
26+
python -m build
3727
--sdist
3828
--wheel
3929
--outdir dist/
4030
.
41-
4231
- name: Publish distribution to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
4333
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)