Skip to content

Commit 045186f

Browse files
authored
ci: create a GitHub Release on tag (#12)
1 parent 74dc5eb commit 045186f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,18 @@ jobs:
6464
env:
6565
PYPI_REGISTRY_TOKEN: ${{ secrets.PYPI_REGISTRY_TOKEN }}
6666
run: poetry publish --build --username __token__ --password "$PYPI_REGISTRY_TOKEN"
67+
68+
# Publishing the package and announcing it are separate concerns: this job is
69+
# kept apart from `publish` so the credential-bearing job keeps `contents: read`.
70+
release:
71+
needs: publish
72+
runs-on: ubuntu-latest
73+
permissions:
74+
contents: write
75+
steps:
76+
- name: GitHub Release
77+
uses: softprops/action-gh-release@v2
78+
with:
79+
generate_release_notes: true
80+
# A SemVer pre-release suffix is the only place a hyphen appears in the tag.
81+
prerelease: ${{ contains(github.ref_name, '-') }}

0 commit comments

Comments
 (0)