From 8b52f3f9a52a77b930715906cdba3e4033b2fe60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Sat, 15 Jun 2024 04:13:49 +0100 Subject: [PATCH] Release workflow: Move changelog retrieval to the build job --- .github/workflows/make_release.yaml | 38 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/make_release.yaml b/.github/workflows/make_release.yaml index 4d5c48824..76a2b5170 100644 --- a/.github/workflows/make_release.yaml +++ b/.github/workflows/make_release.yaml @@ -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