Publish a release whenever a version tag is pushed.

Section: Release and deployment workflows

Create a GitHub release on tag push

yaml
yaml
on:
  push:
    tags:
      - "v*"

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4
      - uses: softprops/action-gh-release@v2
        with:
          generate_release_notes: true
Explanation

This pattern automates GitHub Releases for semantic version tags.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Release and deployment workflows
Publish an npm package
Publish to npm from GitHub Actions.
OpenIn sheetyamlsame section
Deploy only from main after tests
Gate deployments on successful CI from the main branch.
OpenIn sheetyamlsame section
Node.js CI workflow
Install dependencies, lint, test, and build a Node project.
Python CI workflow
Set up Python, install dependencies, and run tests.
Build a Docker image
Use Buildx for modern Docker builds.