name: Release
run-name: ✨ Release ${{ github.ref_name }} triggered by @${{ github.actor }}

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

jobs:
  release:
    runs-on: ubuntu-24.04
    permissions:
      contents: write
      packages: write
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Create Release and Generate Notes
        uses: softprops/action-gh-release@v1
        with:
          name: github-enterprise-mcp ${{ github.ref_name }}
          generate_release_notes: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}