name: Sentry Release

# yamllint disable-line rule:truthy
on:
  release:
    types: [published, prereleased]

jobs:
  createSentryRelease:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code from GitHub
        uses: actions/checkout@v3.0.2
      - name: Sentry Release
        uses: getsentry/action-release@v1.1.6
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
          SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
        with:
          environment: production
