Skip to content

Commit

Permalink
Release workflow: Move changelog retrieval to the build job
Browse files Browse the repository at this point in the history
  • Loading branch information
snejus committed Jun 15, 2024
1 parent ed574f4 commit 8b52f3f
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/make_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,26 @@ 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/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install dependencies
run: poetry install --only=release

- name: Install pandoc
run: sudo apt update && sudo apt install pandoc -y

- name: Obtain the changelog
run: echo "changelog=$(poe changelog)" >> $GITHUB_OUTPUT

- name: Build a binary wheel and a source tarball
run: poetry build
Expand All @@ -58,24 +71,9 @@ jobs:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build
env:
CHANGELOG: ${{ needs.build.outputs.changelog }}
steps:
- uses: actions/checkout@v4
- name: Install Python tools
uses: BrandonLWhite/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry

- name: Install dependencies
run: poetry install --only=release

- name: Install pandoc
run: sudo apt update && sudo apt install pandoc -y

- name: Obtain the changelog
run: echo CHANGELOG="$(poe changelog)" >> $GITHUB_ENV

- name: Tag the commit
id: tag_version
uses: mathieudutour/github-tag-action@v6
Expand Down

0 comments on commit 8b52f3f

Please sign in to comment.