name: Create Release

on:
  push:
    tags: ['*']
  workflow_dispatch:

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Create Release with Auto Changelog
        uses: softprops/action-gh-release@v1
        with:
          generate_release_notes: true
          draft: false
          prerelease: false
          body: |
            ## 📦 Usage as Crate

            Add to your `Cargo.toml`:
            ```toml
            neutralts = "${{ github.ref_name }}"
            ```

            Available on crates.io: https://crates.io/crates/neutralts

        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
