name: Publish GitHub Release

permissions:
  contents: write # for creating a release and uploading release artifacts

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
  release:
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v3
      - name: GH Release
        run: |
          gh release create "${GITHUB_REF#refs/tags/}" --generate-notes
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
