Skip to content

Commit

Permalink
ci: add release changelog generation and push (#46)
Browse files Browse the repository at this point in the history
* ci: add release changelog generation and push

* fix: messed up copypasta

* fix: casing
  • Loading branch information
JacobCoffee authored Jan 12, 2025
1 parent e6140f9 commit 1b77777
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/cd.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
permissions:
id-token: write
environment: release
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -30,3 +32,20 @@ jobs:

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: pyproject.toml
args: -vv --latest --strip header

- name: Commit changelog
run: |
git checkout main
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add docs/changelog.rst
git commit -m "release: update changelog"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git main

0 comments on commit 1b77777

Please sign in to comment.