diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml new file mode 100644 index 0000000..3f0bb69 --- /dev/null +++ b/.github/actions/install/action.yml @@ -0,0 +1,17 @@ +name: install action + +runs: + using: composite + steps: + - name: Checkout the repo + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + with: + fetch-depth: 0 + + - name: Setup Node and pnpm + uses: jdx/mise-action@v2 + + - name: Install dependencies + run: | + pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components + shell: bash \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ecd3c32..962072e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -21,21 +21,9 @@ jobs: with: fetch-depth: 0 - - name: Setup Node 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.19 - always-auth: true - - - name: Install PNPM - run: npm install -g pnpm@9.4.0 - shell: bash - - - name: Install dependencies - run: | - pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components - shell: bash - + - name: Setup and Install dependencies + uses: ./.github/actions/install + - name: Publish ccip-js to NPM run: | pnpm build-ccip-js @@ -63,20 +51,8 @@ jobs: with: fetch-depth: 0 - - name: Setup Node 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.19 - always-auth: true - - - name: Install PNPM - run: npm install -g pnpm@9.4.0 - shell: bash - - - name: Install dependencies - run: | - pnpm install --frozen-lockfile --strict-peer-dependencies --filter=ccip-js --filter=ccip-react-components - shell: bash + - name: Setup and Install dependencies + uses: ./.github/actions/install - name: Dry-run publish ccip-js run: | diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..65bea4f --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +node 20.19 +pnpm 9.4.0 \ No newline at end of file