Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ jobs:
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: deploy --env staging --outdir=./dist

- name: Upload sourcemaps for dist-worker-staging
if: github.event_name == 'push'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
npx sentry-cli sourcemaps inject --org nodejs --project dist-worker-staging ./dist && npx sentry-cli sourcemaps upload --org nodejs --project dist-worker-staging ./dist
command: deploy --env staging --outdir=./dist --upload-source-maps --var SENTRY_RELEASE:$(npx sentry-cli releases propose-version)

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

- name: Upload Source Maps to Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: nodejs-org
SENTRY_PROJECT: ${{ (github.event_name == 'workflow_dispatch' && 'dist-worker-prod') || 'dist-worker-staging' }}
run: ./scripts/upload-sourcemaps.sh

- name: Alert on Failure
if: failure() && github.repository == 'nodejs/release-cloudflare-worker'
Expand Down
Loading
Loading