This repository was archived by the owner on Mar 17, 2026. It is now read-only.
Merge pull request #53 from smartcontractkit/deprecation-notice #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # NPM_TOKEN will only be populated in the context of the `publish` GH environment, see L14 | |
| # Dry run job split as a separate job to conditionally omit `environment` | |
| name: Publish to NPM | |
| on: | |
| push: | |
| branches: | |
| - "**" # Run on all branches, but only publish from main | |
| jobs: | |
| publish-on-main: | |
| if: github.ref_name == 'main' | |
| runs-on: ubuntu-latest | |
| environment: publish | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19 | |
| always-auth: true | |
| registry-url: https://registry.npmjs.org | |
| - name: Update npm for trusted publishing | |
| run: npm install -g npm@latest | |
| shell: bash | |
| - name: Install PNPM | |
| run: npm install -g pnpm@10 | |
| shell: bash | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components | |
| shell: bash | |
| - name: Publish ccip-js to NPM | |
| run: | | |
| pnpm build-ccip-js | |
| cd packages/ccip-js | |
| pnpm publish --no-git-checks --access public | |
| shell: bash | |
| - name: Publish ccip-react-components to NPM | |
| run: | | |
| pnpm build-components | |
| cd packages/ccip-react-components | |
| pnpm publish --no-git-checks --access public | |
| shell: bash | |
| dry-run-publish: | |
| if: github.ref_name != 'main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout the repo | |
| uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19 | |
| always-auth: true | |
| registry-url: https://registry.npmjs.org | |
| - name: Update npm for trusted publishing | |
| run: npm install -g npm@latest | |
| shell: bash | |
| - name: Install PNPM | |
| run: npm install -g pnpm@10 | |
| shell: bash | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components | |
| shell: bash | |
| - name: Dry-run publish ccip-js | |
| run: | | |
| pnpm build-ccip-js | |
| cd packages/ccip-js | |
| pnpm publish --no-git-checks --access public --dry-run | |
| shell: bash | |
| - name: Dry-run publish ccip-react-components | |
| run: | | |
| pnpm build-components | |
| cd packages/ccip-react-components | |
| pnpm publish --no-git-checks --access public --dry-run | |
| shell: bash |