Skip to content

Commit

Permalink
only run pypi if release+sign succeed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnot committed Sep 16, 2023
1 parent 9aeaa12 commit 93a355b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,6 @@ jobs:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish Python distribution to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/redbot
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

release:
name: Release to Github
needs:
Expand Down Expand Up @@ -97,3 +77,23 @@ jobs:
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-pypi:
name: Publish Python distribution to PyPI
needs:
- sign
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/redbot
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 93a355b

Please sign in to comment.