name: Release
on:
  workflow_dispatch:
  schedule:
    - cron: "0 9 * * 0"

jobs:
  test:
    name: Test
    uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/ci-python-uv-with-docker.yml@main
    with:
      python-version: 3.13
    secrets:
      SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
      SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

  create_release:
    name: Create Release
    needs: test
    uses: https://git.tainton.uk/actions/gha-workflows/.gitea/workflows/create-release.yml@main
    secrets:
      ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}

  print_release:
    name: Print Release
    runs-on: ubuntu-latest
    needs: create_release
    steps:
      - run: echo "Created release ${{ needs.create_release.outputs.release_name }}."