Skip to content

Commit

Permalink
ci: move Sentry source map upload to package build step of CI workflow (
Browse files Browse the repository at this point in the history
#1508)

* ci: move Sentry source map upload to package build step of CI workflow

Source map association must be done with the exact build being deployed.
This change moves the generation and upload to the build that runs on release branches,
which will run more often than required but the impact is low.
  • Loading branch information
rhyslbw authored and mchappell committed Oct 31, 2024
1 parent 8cd5b2c commit 1dd20ab
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 36 deletions.
15 changes: 15 additions & 0 deletions .github/actions/build/app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,23 @@ inputs:
description: 'Banxa`s integration URL'
required: false
default: 'https://lacewallet.banxa-sandbox.com/'
SENTRY_AUTH_TOKEN:
description: 'Authentication token for Sentry, used to publish source maps for releases'
required: false
default: ''
SENTRY_DSN:
description: 'Data Source Name for Sentry, AKA Client Key. This tells a Sentry SDK where to send events so the events are associated
with the correct project'
required: false
default: ''
SENTRY_ORG:
description: 'Organization identifier for Sentry, used to publish source maps for releases'
required: false
default: ''
SENTRY_PROJECT:
description: 'Project identifier for Sentry, used to publish source maps for releases'
required: false
default: ''

runs:
using: 'composite'
Expand All @@ -52,7 +64,10 @@ runs:
POSTHOG_PRODUCTION_TOKEN: ${{ inputs.POSTHOG_PRODUCTION_TOKEN }}
PRODUCTION_MODE_TRACKING: ${{ inputs.PRODUCTION_MODE_TRACKING }}
BANXA_LACE_URL: ${{ inputs.BANXA_LACE_URL }}
SENTRY_AUTH_TOKEN: ${{ inputs.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ inputs.SENTRY_DSN }}
SENTRY_ORG: ${{ inputs.SENTRY_ORG }}
SENTRY_PROJECT: ${{ inputs.SENTRY_PROJECT }}

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ jobs:
POSTHOG_PRODUCTION_TOKEN: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.POSTHOG_PRODUCTION_TOKEN || '' }}
PRODUCTION_MODE_TRACKING: ${{ startsWith(github.ref, 'refs/heads/release') && 'true' || 'false' }}
BANXA_LACE_URL: ${{ startsWith(github.ref, 'refs/heads/release') && 'https://lacewallet.banxa.com/' }}
SENTRY_AUTH_TOKEN: ${{ startsWith(github.ref, 'refs/heads/release') && secrets.SENTRY_AUTH_TOKEN || '' }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ORG: ${{ startsWith(github.ref, 'refs/heads/release') && vars.SENTRY_ORG || '' }}
SENTRY_PROJECT: ${{ startsWith(github.ref, 'refs/heads/release') && vars.SENTRY_PROJECT || ''}}

build:
name: Build Lace
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/sentry-release.yml

This file was deleted.

0 comments on commit 1dd20ab

Please sign in to comment.