name: publish-release-candidate
on:
  push:
    tags:
      - '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]'

jobs:
  test-and-build:
    uses: ./.github/workflows/test-and-build.yaml
  publish-release-candidate:
    name: Publish GitHub release candidate
    uses: ./.github/workflows/publish-release-type.yaml
    needs: [test-and-build]
    with:
      isReleaseCandidate: true
    secrets:
      githubToken: ${{ secrets.WEAVEWORKSBOT_TOKEN }}
