Skip to content

Commit f251577

Browse files
authored
fix(Sentry): use correct release (#384)
1 parent 0fbf611 commit f251577

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/continuous-delivery.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ jobs:
170170
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
171171
with:
172172
environment: ${{ needs.metadata.outputs.stage }}
173+
version: ${{ needs.merge.outputs.sha }}
173174
set_commits: skip
174175

175176
- name: Finish deployment

.github/workflows/publish-image.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
steps:
3030
- name: Get metadata
3131
id: get_metadata
32+
env:
33+
INPUT_SHA: ${{ inputs.sha }}
3234
run: |
3335
if [ $GITHUB_REF_NAME = 'master' ]; then
3436
echo '::set-output name=tag::latest'
@@ -37,18 +39,12 @@ jobs:
3739
fi
3840
3941
if [ $GITHUB_REF_NAME = 'staging' ] || [ $GITHUB_REF_NAME = 'master' ]; then
40-
BUILD_ARGS='BUILD_HASH='$GITHUB_SHA
42+
BUILD_ARGS='BUILD_HASH='${INPUT_SHA:-GITHUB_SHA}
4143
if [ $GITHUB_REF_NAME = 'staging' ]; then
4244
BUILD_ARGS+=$'\nDEPLOY_TARGET=staging'
4345
fi
4446
BUILD_ARGS=${BUILD_ARGS//$'\n'/'%0A'}
4547
echo '::set-output name=build_args::'$BUILD_ARGS
46-
47-
if [ $GITHUB_REF_NAME = 'master' ]; then
48-
echo '::set-output name=stage::production'
49-
else
50-
echo '::set-output name=stage::staging'
51-
fi
5248
fi
5349
5450
publish:
@@ -99,9 +95,9 @@ jobs:
9995
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
10096
SENTRY_PROJECT: ${{ env.PROJECT_NAME }}
10197
with:
102-
environment: ${{ needs.metadata.outputs.stage }}
10398
finalize: false
10499
sourcemaps: sourcemaps
100+
version: ${{ inputs.sha }}
105101
url_prefix: ~/assets/
106102

107103
update_check_run:

config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module.exports = function(environment) {
9999
sentry: {
100100
dsn: 'https://[email protected]/12345', // invalid key, will be replaced when run as prod
101101
environment: deployTarget,
102-
release: `amber-ui@${process.env.BUILD_HASH}`
102+
release: process.env.BUILD_HASH
103103
}
104104
};
105105

0 commit comments

Comments
 (0)