Skip to content

Commit

Permalink
Update release job to create automate GitHub releases
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Feb 7, 2024
1 parent 1740c4e commit 6509244
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: PyPI Release
name: Create Release
on:
push:
branches:
- main
tags:
- "*"
- "v*"
jobs:
# Adapted from: https://github.com/pypa/gh-action-pypi-publish#usage
pypi-publish:
if: ${{ startsWith(github.ref, 'refs/tags') }}
name: Build, Lint, Test, Release to PyPI
runs-on: ubuntu-latest
environment:
Expand Down Expand Up @@ -50,3 +47,20 @@ jobs:

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

github-release:
name: Release pushed tag on GitHub
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
gh release create "$TAG" \
--repo="$GITHUB_REPOSITORY" \
--title="$TAG" \
--generate-notes

0 comments on commit 6509244

Please sign in to comment.