diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 192b5f65..66580fc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,11 +16,13 @@ jobs: - run: env | sort - run: make dev-doc - run: CI_PAGES_URL=${{ steps.pages.outputs.base_url }} make doc - - name: Upload changelog + - name: Generate release notes + run: make release-notes > release-notes.md + - name: Upload release notes uses: actions/upload-artifact@v4 with: - name: changelog - path: docs/changelog.md + name: release-notes + path: release-notes.md - name: Upload pages artifact uses: actions/upload-pages-artifact@v3 with: @@ -31,18 +33,10 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Install git-changelog using pipx - run: pipx install git-changelog - - name: Remove changelog to avoid file already exists error - run: rm -v docs/changelog.md - - name: Download changelog + - name: Download release notes uses: actions/download-artifact@v4 with: - name: changelog - path: docs/ - - name: Prepare release notes - run: make release-notes > release-notes.md + name: release-notes - id: prerelease name: Determine prerelease run: | diff --git a/Makefile b/Makefile index c141fcca..7db5b1fd 100644 --- a/Makefile +++ b/Makefile @@ -134,7 +134,7 @@ changelog: # Generate release notes from changelog. release-notes: - @git-changelog --input $(CHANGELOG_PATH) --release-notes + @pdm run $(PDM_GLOBAL) git-changelog --input $(CHANGELOG_PATH) --release-notes # Build documentation only from src. doc-gen: diff --git a/template/Makefile.jinja b/template/Makefile.jinja index f1c0a261..d4b2255f 100644 --- a/template/Makefile.jinja +++ b/template/Makefile.jinja @@ -137,7 +137,7 @@ changelog: # Generate release notes from changelog. release-notes: - @git-changelog --input $(CHANGELOG_PATH) --release-notes + @pdm run $(PDM_GLOBAL) git-changelog --input $(CHANGELOG_PATH) --release-notes # Build documentation only from src. doc-gen: diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja index 8e2e6bae..4dc25bda 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/release.yml.jinja @@ -17,11 +17,13 @@ jobs: - run: env | sort - run: make dev-doc - run: CI_PAGES_URL={{ '${{ steps.pages.outputs.base_url }}' }} make doc - - name: Upload changelog + - name: Generate release notes + run: make release-notes > release-notes.md + - name: Upload release notes uses: actions/upload-artifact@v4 with: - name: changelog - path: docs/changelog.md + name: release-notes + path: release-notes.md - name: Upload pages artifact uses: actions/upload-pages-artifact@v3 with: @@ -32,18 +34,10 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Install git-changelog using pipx - run: pipx install git-changelog - - name: Remove changelog to avoid file already exists error - run: rm -v docs/changelog.md - - name: Download changelog + - name: Download release notes uses: actions/download-artifact@v4 with: - name: changelog - path: docs/ - - name: Prepare release notes - run: make release-notes > release-notes.md + name: release-notes - id: prerelease name: Determine prerelease run: |