File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 1515
1616SENTRY_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
You can’t perform that action at this time.
0 commit comments