-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (37 loc) · 1.3 KB
/
deploy-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy API
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 9.4.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "20.x"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm -r build && pnpm -r test && pnpm -r lint
- name: Build and Deploy API
run: pnpm --filter api exec wrangler deploy --var SENTRY_RELEASE:$(pnpm --filter api exec sentry-cli releases propose-version)
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Deploy Source Maps
run: |
VERSION=`pnpm --filter api exec sentry-cli releases propose-version`
pnpm --filter api exec sentry-cli releases new "$VERSION" --finalize
pnpm --filter api exec sentry-cli releases files $VERSION upload-sourcemaps dist
env:
SENTRY_ORG: "netrunner-beanstalk"
SENTRY_PROJECT: "beanstalk-api"
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}