From e4c3c9287bf516fcd5812acd1746424fca4800c4 Mon Sep 17 00:00:00 2001 From: dhananjaypai08 Date: Fri, 13 Jun 2025 12:08:43 +0530 Subject: [PATCH 1/5] feat/(ci-cd-install): install jobs ci-cd integration --- .github/actions/install/action.yml | 17 +++++++++++++++++ .github/workflows/install.yml | 18 ++++++++++++++++++ .github/workflows/publish.yaml | 23 ++++++++--------------- .tool-versions | 2 ++ 4 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 .github/actions/install/action.yml create mode 100644 .github/workflows/install.yml create mode 100644 .tool-versions diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml new file mode 100644 index 0000000..9129020 --- /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/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000..acbf440 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,18 @@ +name: Install Dependencies + +on: + workflow_call: + inputs: + runner: + type: string + default: 'ubuntu-latest' + +jobs: + install: + runs-on: ${{ inputs.runner }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup and Install + uses: ./.github/actions/install \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ecd3c32..b1a12e2 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,6 +9,11 @@ on: - "**" # Run on all branches, but only publish from main jobs: + install: + uses: ./.github/workflows/install.yml + with: + runner: 'ubuntu-latest' + publish-on-main: if: github.ref_name == 'main' runs-on: ubuntu-latest @@ -21,21 +26,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: install + - name: Publish ccip-js to NPM run: | pnpm build-ccip-js 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 From 3970a0298bba66f441a8b5a2f3db6dad6aebaf90 Mon Sep 17 00:00:00 2001 From: dhananjaypai08 Date: Fri, 13 Jun 2025 12:11:36 +0530 Subject: [PATCH 2/5] fix/(ci-cd-install): fixing syntax --- .github/workflows/publish.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b1a12e2..b748544 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,7 +12,7 @@ jobs: install: uses: ./.github/workflows/install.yml with: - runner: 'ubuntu-latest' + runner: ubuntu-latest publish-on-main: if: github.ref_name == 'main' From 94961123ed3dec71a9ae2b93ad958a97cf84f83c Mon Sep 17 00:00:00 2001 From: dhananjaypai08 Date: Fri, 13 Jun 2025 12:13:51 +0530 Subject: [PATCH 3/5] fix/(ci-cd-install): fixing syntax --- .github/workflows/install.yml | 18 ------------------ .github/workflows/publish.yaml | 7 +------ 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 .github/workflows/install.yml diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml deleted file mode 100644 index acbf440..0000000 --- a/.github/workflows/install.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Install Dependencies - -on: - workflow_call: - inputs: - runner: - type: string - default: 'ubuntu-latest' - -jobs: - install: - runs-on: ${{ inputs.runner }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup and Install - uses: ./.github/actions/install \ No newline at end of file diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b748544..dee4688 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,11 +9,6 @@ on: - "**" # Run on all branches, but only publish from main jobs: - install: - uses: ./.github/workflows/install.yml - with: - runner: ubuntu-latest - publish-on-main: if: github.ref_name == 'main' runs-on: ubuntu-latest @@ -27,7 +22,7 @@ jobs: fetch-depth: 0 - name: Setup and Install dependencies - uses: install + uses: ./.github/actions/install - name: Publish ccip-js to NPM run: | From 5c6b4d8170228bda220e173d27efcb57316ca5a6 Mon Sep 17 00:00:00 2001 From: dhananjaypai08 Date: Fri, 13 Jun 2025 12:14:45 +0530 Subject: [PATCH 4/5] fix/(ci-cd-install): dry run publish fix --- .github/workflows/publish.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index dee4688..962072e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -51,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: | From 068a0481cab5aa042fd5bc372355c86981300ba4 Mon Sep 17 00:00:00 2001 From: dhananjaypai08 Date: Fri, 13 Jun 2025 12:15:44 +0530 Subject: [PATCH 5/5] fix/(ci-cd-install): composite action --- .github/actions/install/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml index 9129020..3f0bb69 100644 --- a/.github/actions/install/action.yml +++ b/.github/actions/install/action.yml @@ -14,4 +14,4 @@ runs: - 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 + shell: bash \ No newline at end of file