Create release #5
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
name: Create release | |
on: | |
workflow_dispatch: | |
jobs: | |
changelog: | |
name: Create changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Generate changelog and determine version | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v5 | |
with: | |
preset: conventionalcommits | |
github-token: ${{ secrets.GH_AIDE_TOKEN }} | |
git-user-name: ${{ github.actor }} | |
git-user-email: ${{ github.actor }}@users.noreply.github.com | |
tag-prefix: '' | |
input-file: 'CHANGELOG.md' | |
output-file: 'CHANGELOG.md' | |
release-count: 10000 | |
skip-on-empty: false | |
skip-version-file: true | |
- name: Update version in pyproject.toml | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
run: | | |
VERSION=${{ steps.changelog.outputs.tag }} | |
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml | |
shell: bash | |
- name: Commit updated version | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
run: | | |
git config --local user.name "${{ github.actor }}" | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
git add pyproject.toml | |
git commit -m "chore: update version to ${{ steps.changelog.outputs.tag }}" | |
git push | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
with: | |
tag_name: ${{ steps.changelog.outputs.tag }} | |
body: ${{ steps.changelog.outputs.clean_changelog }} | |
token: ${{ secrets.GH_AIDE_TOKEN }} |