Skip to content

Commit

Permalink
build: update cd (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman authored Aug 6, 2024
1 parent bc9a125 commit 3e07cfb
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:

- uses: hynek/build-and-inspect-python-package@v2

publish:
test-publish:
needs: [dist]
name: Publish to PyPI
environment: pypi
name: Publish to TestPyPI
environment:
name: testpypi
permissions:
id-token: write
runs-on: ubuntu-latest
Expand All @@ -49,6 +50,21 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release' && github.event.action == 'published'
with:
# Remember to tell (test-)pypi about this repo before publishing
# Remove this line to publish to PyPI
repository-url: https://test.pypi.org/legacy/

publish:
needs: [test-publish]
name: Publish to PyPI
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 3e07cfb

Please sign in to comment.