-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
39 lines (34 loc) · 1.04 KB
/
cloudbuild.yaml
File metadata and controls
39 lines (34 loc) · 1.04 KB
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
availableSecrets:
secretManager:
- versionName: projects/895878195922/secrets/FirebaseUI_NPM_Publish_Token/versions/latest
env: "NPM_TOKEN"
options:
logging: CLOUD_LOGGING_ONLY
steps:
- name: "node:22"
entrypoint: "bash"
args:
- "-c"
- |
corepack enable
pnpm install --frozen-lockfile
id: "install"
# 3. Publish to NPM
# This step authenticates using the secret token and handles both
# single-package and monorepo (workspaces) structures.
- name: "node:22"
entrypoint: "bash"
args:
- "-c"
- |
corepack enable
# Configure npm authentication
echo "//registry.npmjs.org/:_authToken=$$NPM_TOKEN" > .npmrc
pnpm run publish:npm:all
# Pass through default substitutions from https://docs.cloud.google.com/build/docs/configuring-builds/substitute-variable-values#using_default_substitutions
env:
- "TAG_NAME=$TAG_NAME"
- "SHORT_SHA=$SHORT_SHA"
- "COMMIT_SHA=$COMMIT_SHA"
secretEnv: ["NPM_TOKEN"]
id: "build and publish"