name: Notify Slack about a release

on:
  workflow_dispatch:
  release:
    types: [published]

jobs:
  build:
    runs-on: ubuntu-22.04

    steps:
    - uses: actions/checkout@v6

    - name: Setup Python
      uses: actions/setup-python@v6
      with:
        python-version: '3.10'

    - name: Notify Slack about the release
      env:
        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
      run: pip install requests && python utils/notify_slack_about_release.py
