Move SENTRY_DSN to secrets (#8096)
* Move SENTRY_DSN to secrets * Disable without DSN * Add to secondary build in android ci
This commit is contained in:
@@ -66,3 +66,4 @@ jobs:
|
|||||||
SENTRY_DIST=${{ steps.vars.outputs.SENTRY_DIST }}
|
SENTRY_DIST=${{ steps.vars.outputs.SENTRY_DIST }}
|
||||||
SENTRY_RELEASE=${{ steps.vars.outputs.SENTRY_RELEASE }}
|
SENTRY_RELEASE=${{ steps.vars.outputs.SENTRY_RELEASE }}
|
||||||
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
SENTRY_DSN=${{ secrets.SENTRY_DSN }}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
|
echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: 🏗️ EAS Build
|
- name: 🏗️ EAS Build
|
||||||
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} yarn use-build-number-with-bump eas build -p android --profile ${{ inputs.profile || 'testflight-android' }} --local --output build.aab --non-interactive
|
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p android --profile ${{ inputs.profile || 'testflight-android' }} --local --output build.aab --non-interactive
|
||||||
|
|
||||||
- name: ✍️ Rename Testflight bundle
|
- name: ✍️ Rename Testflight bundle
|
||||||
if: ${{ inputs.profile != 'production' }}
|
if: ${{ inputs.profile != 'production' }}
|
||||||
@@ -139,7 +139,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🏗️ Build Production APK
|
- name: 🏗️ Build Production APK
|
||||||
if: ${{ inputs.profile == 'production' }}
|
if: ${{ inputs.profile == 'production' }}
|
||||||
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} yarn use-build-number-with-bump eas build -p android --profile production-apk --local --output build.apk --non-interactive
|
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p android --profile production-apk --local --output build.apk --non-interactive
|
||||||
|
|
||||||
- name: 🚀 Upload Production APK Artifact
|
- name: 🚀 Upload Production APK Artifact
|
||||||
id: upload-artifact-production-apk
|
id: upload-artifact-production-apk
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
|
echo "SENTRY_RELEASE=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: 🏗️ EAS Build
|
- name: 🏗️ EAS Build
|
||||||
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} yarn use-build-number-with-bump eas build -p ios --profile ${{ inputs.profile || 'testflight' }} --local --output build.ipa --non-interactive
|
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} yarn use-build-number-with-bump eas build -p ios --profile ${{ inputs.profile || 'testflight' }} --local --output build.ipa --non-interactive
|
||||||
|
|
||||||
- name: 🚀 Deploy
|
- name: 🚀 Deploy
|
||||||
run: eas submit -p ios --non-interactive --path build.ipa
|
run: eas submit -p ios --non-interactive --path build.ipa
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ jobs:
|
|||||||
|
|
||||||
- name: 🏗️ Create Bundle
|
- name: 🏗️ Create Bundle
|
||||||
if: ${{ !steps.fingerprint.outputs.includes-changes }}
|
if: ${{ !steps.fingerprint.outputs.includes-changes }}
|
||||||
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} EXPO_PUBLIC_ENV="${{ inputs.channel || 'testflight' }}" yarn export
|
run: SENTRY_DIST=${{ steps.sentry.outputs.SENTRY_DIST }} SENTRY_RELEASE=${{ steps.sentry.outputs.SENTRY_RELEASE }} SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_DSN=${{ secrets.SENTRY_DSN }} EXPO_PUBLIC_ENV="${{ inputs.channel || 'testflight' }}" yarn export
|
||||||
|
|
||||||
- name: 📦 Package Bundle and 🚀 Deploy
|
- name: 📦 Package Bundle and 🚀 Deploy
|
||||||
if: ${{ !steps.fingerprint.outputs.includes-changes }}
|
if: ${{ !steps.fingerprint.outputs.includes-changes }}
|
||||||
|
|||||||
+3
-1
@@ -39,6 +39,8 @@ ENV SENTRY_RELEASE=$SENTRY_RELEASE
|
|||||||
ARG SENTRY_DIST
|
ARG SENTRY_DIST
|
||||||
# Default to RENDER_GIT_COMMIT if not set by GitHub workflows
|
# Default to RENDER_GIT_COMMIT if not set by GitHub workflows
|
||||||
ENV SENTRY_DIST=${SENTRY_DIST:-$RENDER_GIT_COMMIT}
|
ENV SENTRY_DIST=${SENTRY_DIST:-$RENDER_GIT_COMMIT}
|
||||||
|
ARG SENTRY_DSN
|
||||||
|
ENV SENTRY_DSN=$SENTRY_DSN
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy everything into the container
|
# Copy everything into the container
|
||||||
@@ -64,7 +66,7 @@ RUN \. "$NVM_DIR/nvm.sh" && \
|
|||||||
yarn && \
|
yarn && \
|
||||||
yarn intl:build 2>&1 | tee i18n.log && \
|
yarn intl:build 2>&1 | tee i18n.log && \
|
||||||
if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compile errors!\n\n"; fi && \
|
if grep -q "invalid syntax" "i18n.log"; then echo "\n\nFound compilation errors!\n\n" && exit 1; else echo "\n\nNo compile errors!\n\n"; fi && \
|
||||||
EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER EXPO_PUBLIC_BUNDLE_DATE=$() SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN SENTRY_RELEASE=$SENTRY_RELEASE SENTRY_DIST=$SENTRY_DIST yarn build-web
|
EXPO_PUBLIC_BUNDLE_IDENTIFIER=$EXPO_PUBLIC_BUNDLE_IDENTIFIER EXPO_PUBLIC_BUNDLE_DATE=$() SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN SENTRY_RELEASE=$SENTRY_RELEASE SENTRY_DIST=$SENTRY_DIST SENTRY_DSN=$SENTRY_DSN yarn build-web
|
||||||
|
|
||||||
# DEBUG
|
# DEBUG
|
||||||
RUN find ./bskyweb/static && find ./web-build/static
|
RUN find ./bskyweb/static && find ./web-build/static
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ const release = process.env.SENTRY_RELEASE || pkgJson.version
|
|||||||
const dist = process.env.SENTRY_DIST || 'dev'
|
const dist = process.env.SENTRY_DIST || 'dev'
|
||||||
|
|
||||||
init({
|
init({
|
||||||
enabled: !__DEV__,
|
enabled: !__DEV__ && !!process.env.SENTRY_DSN,
|
||||||
autoSessionTracking: false,
|
autoSessionTracking: false,
|
||||||
dsn: 'https://8fb55ba4807fca137eedfc8403ee27ba@o4505071687041024.ingest.us.sentry.io/4508807082278912',
|
dsn: process.env.SENTRY_DSN,
|
||||||
debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
|
debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
|
||||||
environment: process.env.NODE_ENV,
|
environment: process.env.NODE_ENV,
|
||||||
dist,
|
dist,
|
||||||
|
|||||||
Reference in New Issue
Block a user