Make make-github-release job dependent on publish-to-pypi

This commit is contained in:
Šarūnas Nejus 2024-06-15 08:48:13 +01:00
parent 8b52f3f9a5
commit 190198bfa6
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435

View file

@ -67,10 +67,28 @@ jobs:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish distribution 📦 to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/beets
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
make-github-release:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build
needs: publish-to-pypi
env:
CHANGELOG: ${{ needs.build.outputs.changelog }}
steps:
@ -103,21 +121,3 @@ jobs:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
url: ${{ secrets.MASTODON_URL }}
message: "Version ${{ steps.tag_version.outputs.new_tag }} of beets has been released! Check out all of the new changes at ${{ steps.create_release.outputs.html_url }}"
publish-to-pypi:
name: Publish distribution 📦 to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/beets
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1