Release workflow: Move changelog retrieval to the build job

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

View file

@ -37,27 +37,9 @@ jobs:
message: "Increment version to ${{ env.NEW_VERSION }}"
build:
name: Build the distribution packages
name: Get changelog and build the distribution package
runs-on: ubuntu-latest
needs: increment-version
steps:
- uses: actions/checkout@v4
- name: Install Python tools
uses: BrandonLWhite/pipx-install-action@v0.1.1
- name: Build a binary wheel and a source tarball
run: poetry build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
make-github-release:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Install Python tools
@ -74,8 +56,24 @@ jobs:
run: sudo apt update && sudo apt install pandoc -y
- name: Obtain the changelog
run: echo CHANGELOG="$(poe changelog)" >> $GITHUB_ENV
run: echo "changelog=$(poe changelog)" >> $GITHUB_OUTPUT
- name: Build a binary wheel and a source tarball
run: poetry build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
make-github-release:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build
env:
CHANGELOG: ${{ needs.build.outputs.changelog }}
steps:
- name: Tag the commit
id: tag_version
uses: mathieudutour/github-tag-action@v6