Created
August 30, 2023 14:05
-
-
Save elusive/e21a8fe085f1aa9782d4860f3bc3513f to your computer and use it in GitHub Desktop.
Github Actions workflow to create a release when any tag is pushed to main.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
push: | |
tags: | |
- v* | |
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