Skip to content

Commit 8b10193

Browse files
authored
Merge pull request #77 from michalc/ci/tidy-deploy-to-pypi
ci: tidy deploy to PyPI script and environment name
2 parents e363a24 + d3692c7 commit 8b10193

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
name: Publish to PyPI
1+
name: Deploy package to PyPI
2+
3+
###############################################################################
4+
25
on:
6+
37
release:
48
types: [published]
9+
10+
###############################################################################
11+
512
jobs:
13+
614
build:
715
runs-on: ubuntu-latest
816
steps:
917
- uses: actions/checkout@v3
10-
1118
- uses: actions/setup-python@v3
1219
with:
1320
python-version: 3.11
14-
1521
- name: Update version in pyproject.toml from current git tag
1622
run: >-
1723
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF/refs\/tags\/v/}/g" pyproject.toml
18-
1924
- run: |
2025
pip install build
2126
python -m build
22-
2327
- uses: actions/upload-artifact@v3
2428
with:
2529
path: ./dist
2630

27-
pypi-publish:
28-
needs: ['build']
29-
environment: 'publish-pypi'
30-
31-
name: upload release to PyPI
31+
deploy:
32+
needs: [build]
33+
environment: pypi
3234
runs-on: ubuntu-latest
3335
permissions:
3436
id-token: write
3537
steps:
3638
- uses: actions/download-artifact@v3
37-
38-
- name: Publish package distributions to PyPI
39-
uses: pypa/gh-action-pypi-publish@release/v1
39+
- uses: pypa/gh-action-pypi-publish@release/v1
4040
with:
4141
packages_dir: artifact/

0 commit comments

Comments
 (0)