Skip to content

Commit 84d8cf3

Browse files
committed
add cloud build config
1 parent f5bb8e6 commit 84d8cf3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

cloudbuild.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
availableSecrets:
2+
secretManager:
3+
- versionName: projects/895878195922/secrets/FirebaseUI_NPM_Publish_Token/versions/latest
4+
env: "NPM_TOKEN"
5+
6+
steps:
7+
- name: "node:22"
8+
entrypoint: "bash"
9+
args:
10+
- "-c"
11+
- |
12+
corepack enable
13+
pnpm install --frozen-lockfile
14+
id: "install"
15+
16+
# 3. Publish to NPM
17+
# This step authenticates using the secret token and handles both
18+
# single-package and monorepo (workspaces) structures.
19+
- name: "node:22"
20+
entrypoint: "bash"
21+
args:
22+
- "-c"
23+
- |
24+
corepack enable
25+
26+
# Configure npm authentication
27+
echo "//registry.npmjs.org/:_authToken=$$NPM_TOKEN" > .npmrc
28+
29+
pnpm run publish:npm:all
30+
secretEnv: ["NPM_TOKEN"]
31+
id: "build and publish"

0 commit comments

Comments
 (0)