name: release

on:
  # Test that this workflow parses on PR
  pull_request:
  push:
    tags:
      - v*
      - version/*

permissions:
  # writes to the Releases API
  contents: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: softprops/action-gh-release@v1
        # Only execute on a tag
        if: startsWith(github.ref, 'refs/tags/')
        with:
          generate_release_notes: true
