Skip to content

Instantly share code, notes, and snippets.

@lanzani
Created February 1, 2024 22:43
Show Gist options
  • Save lanzani/857e013e5dd06618307ff93d6eb1d87c to your computer and use it in GitHub Desktop.
Save lanzani/857e013e5dd06618307ff93d6eb1d87c to your computer and use it in GitHub Desktop.
Create release on new tag creation.
name: Create release
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
release:
name: Release pushed tag
runs-on: ubuntu-22.04
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment