This repository was archived by the owner on Mar 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
69 lines (59 loc) · 2.02 KB
/
publish.yaml
File metadata and controls
69 lines (59 loc) · 2.02 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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
steps:
- name: Checkout the repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Setup and Install dependencies
uses: ./.github/actions/install
- name: Publish ccip-js to NPM
run: |
pnpm build-ccip-js
cd packages/ccip-js
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_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 config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_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
steps:
- name: Checkout the repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Setup and Install dependencies
uses: ./.github/actions/install
- 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