From c7bbcad80b0168ac5c7d63b1168f3a36868ae4d3 Mon Sep 17 00:00:00 2001 From: Adonis Puente <60629070+adonispuente@users.noreply.github.com> Date: Thu, 19 Dec 2024 11:09:47 -0600 Subject: [PATCH] Create workflow for sentry sourceMaps (#2311) * Create workflow for sentry sourceMaps * Update main.yml --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..c21838297 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: sentryConfig + +on: + workflow_dispatch: + inputs: + commit_hash: + description: 'The commit hash (or branch/tag) to build' + required: true + default: 'master' + +jobs: + createSentryRelease: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.commit_hash }} + + - name: Install dependencies + env: + SENTRY_RELEASE: compliance-${{ github.event.inputs.commit_hash }} + run: npm ci + + - name: Build + env: + SENTRY_RELEASE: compliance-${{ github.event.inputs.commit_hash }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + run: npm run build --if-present + + - name: Create a Sentry.io release + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + with: + tagName: ${{ github.event.inputs.commit_hash }} + releaseNamePrefix: compliance + environment: master + sourcemaps: 'dist/sourcemaps'