Skip to content

Commit

Permalink
ci: Refine release notes generation. (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan authored Feb 2, 2024
1 parent 463db15 commit 5db01c9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down

0 comments on commit 5db01c9

Please sign in to comment.