Skip to content

Commit

Permalink
Merge pull request #25 from tigattack/ci/generate_changelog_release
Browse files Browse the repository at this point in the history
ci(publish): generate changelog, create release
  • Loading branch information
tigattack authored Sep 17, 2024
2 parents 9365d25 + dcd469f commit c06d061
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
name: pypi-publish
name: Release
on:
push:
tags: ["*"]
workflow_dispatch:

jobs:
build:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeTypes: "build,other,style"

- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}

- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }}'
file_pattern: CHANGELOG.md

publish:
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down

0 comments on commit c06d061

Please sign in to comment.