-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: change auto changelog/release actions
- Loading branch information
1 parent
4c4bd36
commit bba3459
Showing
1 changed file
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,31 +101,41 @@ jobs: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
|
||
- name: generate change log | ||
uses: heinrichreimer/[email protected] | ||
- name: update changelog | ||
id: changelog | ||
uses: requarks/changelog-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issues: true | ||
issuesWoLabels: true | ||
pullRequests: true | ||
prWoLabels: true | ||
unreleased: true | ||
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}' | ||
sinceTag: v0.1.0 | ||
output: RELEASE-CHANGELOG.md | ||
token: ${{ github.token }} | ||
tag: ${{ github.ref_name }} | ||
|
||
- uses: actions/download-artifact@v3 | ||
- name: create release | ||
uses: ncipollo/[email protected] | ||
with: | ||
name: artifact | ||
path: dist | ||
allowUpdates: true | ||
draft: false | ||
makeLatest: true | ||
name: ${{ github.ref_name }} | ||
body: ${{ steps.changelog.outputs.changes }} | ||
token: ${{ github.token }} | ||
|
||
- name: create github release | ||
uses: softprops/action-gh-release@v1 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
body_path: ./RELEASE-CHANGELOG.md | ||
files: dist/*.whl | ||
draft: false | ||
prerelease: false | ||
name: artifact | ||
path: dist | ||
|
||
- name: publish to pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
- name: pre-commit on changelog | ||
uses: pre-commit/[email protected] | ||
with: | ||
extra_args: --files CHANGELOG.md | ||
# we only run this to format CHANGELOG.md so pre-commit will fail (yet format it) | ||
continue-on-error: true | ||
|
||
- name: commit changelog | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: main | ||
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' | ||
file_pattern: CHANGELOG.md |