Skip to content

Commit

Permalink
Create GitHub release after publishing to PyPI (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart authored Nov 8, 2024
1 parent edafd92 commit 1d131c9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Publish

on:
push:
tags:
- '*'
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+.post[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -32,3 +37,20 @@ jobs:
uses: actions/download-artifact@v4
- name: Upload packages
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: Create GitHub release
needs: pypi-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- id: changelog
uses: agronholm/release-notes@v1
with:
path: CHANGELOG.md
version_pattern: ^\#\# ([0-9][^*]*)\n
- uses: ncipollo/release-action@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Version history

## 0.1.0

0 comments on commit 1d131c9

Please sign in to comment.