diff --git a/.github/workflows/raygun-deployment.yml b/.github/workflows/raygun-deployment.yml new file mode 100644 index 0000000..f8c6a46 --- /dev/null +++ b/.github/workflows/raygun-deployment.yml @@ -0,0 +1,34 @@ +# Workflow to register a new application deployment with Raygun. + +name: Raygun Deployment Tracking + +on: + push: + tags: [prod/*] + +jobs: + raygun-deployment: + runs-on: ubuntu-latest + steps: + - name: Get the version number + id: get_version + run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT + + - name: Send to the Raygun Deployments API + id: send_deployment + uses: fjogeleit/http-request-action@v1 + with: + url: https://api.raygun.com/v3/applications/api-key/${{ secrets.RAYGUN_APIKEY }}/deployments + method: POST + bearerToken: ${{ secrets.RAYGUN_AUTHTOKEN }} + data: >- + { + "version": "${{ steps.get_version.outputs.VERSION }}", + "ownerName": "${{ github.event.pusher.name }}", + "emailAddress": "${{ github.event.pusher.email }}", + "scmIdentifier": "${{ github.sha }}", + "scmType": "GitHub" + } + + - name: Show response + run: echo ${{ steps.send_deployment.outputs.response }}