Skip to content

Commit

Permalink
build: change auto changelog/release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
martibosch committed Apr 30, 2024
1 parent 4c4bd36 commit bba3459
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bba3459

Please sign in to comment.