Skip to content

Commit 80c442e

Browse files
authored
actions: fix sentry (#842)
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
1 parent b3605d6 commit 80c442e

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ jobs:
4141

4242
- name: Deploy to Staging
4343
if: github.event_name == 'push'
44-
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
45-
with:
46-
apiToken: ${{ secrets.CF_API_TOKEN }}
47-
command: deploy --env staging --outdir=./dist --upload-source-maps --var SENTRY_RELEASE:$(npx sentry-cli releases propose-version)
44+
env:
45+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
46+
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
47+
run: node --run deploy:staging
4848

4949
- name: Deploy to Production
5050
if: github.event_name == 'workflow_dispatch'
51-
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
52-
with:
53-
apiToken: ${{ secrets.CF_API_TOKEN }}
54-
command: deploy --env prod --outdir=./dist --upload-source-maps --var SENTRY_RELEASE:$(npx sentry-cli releases propose-version)
51+
env:
52+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
53+
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
54+
run: node --run deploy:prod
5555

5656
- name: Upload Source Maps to Sentry
5757
env:

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"test": "vitest --run",
1212
"test:watch": "vitest",
1313
"build:mustache": "node scripts/compile-mustache.mjs",
14-
"build:workers-types": "wrangler types --include-env=false && node --run format"
14+
"build:workers-types": "wrangler types --include-env=false && node --run format",
15+
"deploy:prod": "wrangler deploy --env prod --outdir=./dist --upload-source-maps --var SENTRY_RELEASE:$(npx sentry-cli releases propose-version)",
16+
"deploy:staging": "wrangler deploy --env staging --outdir=./dist --upload-source-maps --var SENTRY_RELEASE:$(npx sentry-cli releases propose-version)"
1517
},
1618
"devDependencies": {
1719
"@cloudflare/vitest-pool-workers": "^0.10.1",

scripts/upload-sourcemaps.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ fi
1515

1616
SENTRY_RELEASE=$(npx sentry-cli releases propose-version)
1717

18-
echo Creating release $SENTRY_RELEASE
19-
20-
npx sentry-cli releases new $SENTRY_RELEASE
21-
--org=$SENTRY_ORG
18+
npx sentry-cli releases new $SENTRY_RELEASE \
19+
--org=$SENTRY_ORG \
2220
--project=$SENTRY_PROJECT
2321

2422
# Associate the commits since last release with this release

0 commit comments

Comments
 (0)