Skip to content

Commit

Permalink
Revise order of rules
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-f committed Dec 10, 2024
1 parent abe0ce7 commit f73b195
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@ name: Publish Python 🐍 distribution 📦 to PyPI
on: push

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- name: Generate Changelog
run: .github/release_message.sh > release_message.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release_message.md
build:
name: Build distribution 📦
runs-on: ubuntu-latest
Expand All @@ -41,13 +26,31 @@ jobs:
with:
name: python-package-distributions
path: dist/

release:
name: Create Release
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- name: Generate Changelog
run: .github/release_message.sh > release_message.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release_message.md

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
- release
runs-on: ubuntu-latest
environment:
name: pypi
Expand Down

0 comments on commit f73b195

Please sign in to comment.