This repository was archived by the owner on Mar 17, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # NOTE: See "prepublishOnly" script in package.json
21# NPM_TOKEN will only be populated in the context of the `publish` GH environment, see L14
32
43name : Publish to NPM
54
65on :
76 push :
87 branches :
8+ - " **" # Run on all branches, but only publish from main
99 - " main"
1010
1111jobs :
2929 shell : bash
3030
3131 - name : Install dependencies
32- run :
32+ run : |
3333 pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components
3434 shell : bash
3535
@@ -38,13 +38,23 @@ jobs:
3838 pnpm build-ccip-js
3939 cd packages/ccip-js
4040 pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_CCIP_JS }}
41- pnpm publish --no-git-checks --access public
41+ if [ "${GITHUB_REF_NAME}" != "main" ]; then
42+ echo "Running dry run on non-main branch"
43+ pnpm publish --no-git-checks --access public --dry-run
44+ else
45+ pnpm publish --no-git-checks --access public
46+ fi
4247 shell : bash
4348
4449 - name : Publish ccip-react-components to NPM
4550 run : |
4651 pnpm build-components
4752 cd packages/ccip-react-components
4853 pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_CCIP_REACT_COMPONENTS }}
49- pnpm publish --no-git-checks --access public
50- shell : bash
54+ if [ "${GITHUB_REF_NAME}" != "main" ]; then
55+ echo "Running dry run on non-main branch"
56+ pnpm publish --no-git-checks --access public --dry-run
57+ else
58+ pnpm publish --no-git-checks --access public
59+ fi
60+ shell : bash
You can’t perform that action at this time.
0 commit comments