diff --git a/.github/workflows/app-deploy-prod.yml b/.github/workflows/app-deploy-prod.yml index 1ac542fb5a..a9bd007e3a 100644 --- a/.github/workflows/app-deploy-prod.yml +++ b/.github/workflows/app-deploy-prod.yml @@ -29,6 +29,10 @@ jobs: run: | unzip dist.zip -d packages/app + - name: Update config + run: | + echo "window[\"##runtimeConfig\"] = { sentryDSN: \"${{ vars.SENTRY_DSN }}\" };" > packages/app/dist/config.js + - name: Download Storybook package uses: dsaltares/fetch-gh-release-asset@master with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9a7f5b5e5..8cdc307afa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,6 @@ jobs: GITHUB_TOKEN: ${{ github.token }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | - VITE_SENTRY_DSN=https://ce75ed993f964591901fbe0b7868aa50@o1242386.ingest.sentry.io/4504802315468800 \ VITE_APP_ENVIRONMENT=production \ npx semantic-release @@ -132,7 +131,7 @@ jobs: - name: Update config run: | - echo "window[\"##runtimeConfig\"] = { appEnvironment: \"staging\" };" > packages/app/dist/config.js + echo "window[\"##runtimeConfig\"] = { appEnvironment: \"staging\", sentryDSN: \"${{ vars.SENTRY_DSN }}\" };" > packages/app/dist/config.js - name: Download Storybook package uses: dsaltares/fetch-gh-release-asset@master diff --git a/packages/app/src/composables/useRuntimeConfig.ts b/packages/app/src/composables/useRuntimeConfig.ts index baf2be2004..8622bd74e0 100644 --- a/packages/app/src/composables/useRuntimeConfig.ts +++ b/packages/app/src/composables/useRuntimeConfig.ts @@ -28,10 +28,7 @@ export default (): { return { version: import.meta.env?.VITE_VERSION || "localhost", - sentryDSN: - runtimeConfig?.sentryDSN || - import.meta.env?.VITE_SENTRY_DSN || - "https://ce75ed993f964591901fbe0b7868aa50@o1242386.ingest.sentry.io/4504802315468800", + sentryDSN: runtimeConfig?.sentryDSN || import.meta.env?.VITE_SENTRY_DSN, appEnvironment: runtimeConfig?.appEnvironment || import.meta.env?.VITE_APP_ENVIRONMENT || "local", }; };