name: ReleaseFrontendWorkflow

on:
  release:
    types: [published, prereleased]

jobs:
  createSentryRelease:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@master
      - name: Create a Sentry Frontend release
        uses: tclindner/sentry-releases-action@v1.0.0
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_FRONTEND_AUTH_TOKEN }}
          SENTRY_URL: ${{ secrets.SENTRY_URL }}
          SENTRY_ORG: statping
          SENTRY_PROJECT: frontend
        with:
          tagName: ${{ github.ref }}
          environment: qa
