Skip to content

Commit

Permalink
Upload sourcemaps to Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
angelsl committed Jun 22, 2021
1 parent f4c20c5 commit 761ed2c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build-development.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build source-academy.github.io
name: Build sourceacademy.org
on:
push:
branches:
Expand All @@ -14,6 +14,9 @@ jobs:
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Setup Sentry CLI
run: |
curl -sL https://sentry.io/get-cli/ | INSTALL_DIR=. bash
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down Expand Up @@ -53,6 +56,24 @@ jobs:
PUBLIC_URL: "https://sourceacademy.org"
REACT_APP_GITHUB_OAUTH_PROXY_URL: ${{ secrets.REACT_APP_GITHUB_OAUTH_PROXY_URL }}
REACT_APP_GITHUB_CLIENT_ID: ${{ secrets.REACT_APP_GITHUB_CLIENT_ID }}
- name: Create Sentry release
working-directory: build
run: |
SENTRY_RELEASE="cadet-frontend@$REACT_APP_VERSION"
"$GITHUB_WORKSPACE/sentry-cli" releases new -p "$SENTRY_PROJECT" "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases set-commits --auto "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases files "$SENTRY_RELEASE" upload-sourcemaps --url-prefix '~/static/js' --rewrite static/js
"$GITHUB_WORKSPACE/sentry-cli" releases finalize "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases deploys "$SENTRY_RELEASE" new -e pages
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: sourceacademy
SENTRY_PROJECT: cadet-frontend
REACT_APP_VERSION: ${{ format('{0}-{1}', github.sha, steps.get-time.outputs.time) }}
- name: Remove sourcemaps
working-directory: build
run: |
find -name '*.map' -print -delete
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down

0 comments on commit 761ed2c

Please sign in to comment.