name: Release

on:
  push:
    tags:
      - 'v*'  # Trigger on version tags (v1.0.0, v2.0.16, etc.)

permissions:
  contents: write

jobs:
  create-release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v6
      - name: Release
        uses: softprops/action-gh-release@v3
        with:
          prerelease: >-
            ${{
              contains(github.ref_name, 'rc') ||
              contains(github.ref_name, 'RC') ||
              contains(github.ref_name, 'alpha') ||
              contains(github.ref_name, 'beta')
            }}
