Skip to content

Commit

Permalink
Update pypi github action
Browse files Browse the repository at this point in the history
  • Loading branch information
radiac committed Aug 27, 2024
1 parent 7087b7b commit e175940
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@ on:
- 'v*'

jobs:
publish:

name: Build and publish to PyPI
build:
name: Build package
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Build and check package
uses: hynek/build-and-inspect-python-package@v2
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/checkout@v4
- name: Build and check package
uses: hynek/build-and-inspect-python-package@v2

release:
name: Publish to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
needs: build
steps:
- name: Collect artefacts from build
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit e175940

Please sign in to comment.