From 93f2c4e478aa50f33531214451a6f2bbe1a13b40 Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Fri, 3 Mar 2023 00:31:34 +0100 Subject: [PATCH] feat: create workflow for npm install (#1200) --- .github/actions/npm/action.yml | 16 ++++++++++++++++ .github/workflows/ci.yml | 12 ++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 .github/actions/npm/action.yml diff --git a/.github/actions/npm/action.yml b/.github/actions/npm/action.yml new file mode 100644 index 0000000000..3bcc8f370e --- /dev/null +++ b/.github/actions/npm/action.yml @@ -0,0 +1,16 @@ +name: npm i + +runs: + using: "composite" + steps: + - run: npm i + shell: bash + if: contains(' + refs/heads/master + refs/heads/release-please--branches--master + ', github.ref) + - uses: bahmutov/npm-install@v1 + if: contains(' + refs/heads/master + refs/heads/release-please--branches--master + ', github.ref) == false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c01fdd2c08..ce761f85e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - run: npm run build - run: npm run check - run: npm run doc @@ -32,7 +32,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - name: Generate protobuf code run: | npm run proto @@ -51,7 +51,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - run: npm run build:esm - run: npm run test:browser @@ -75,7 +75,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_JS }} - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - run: npm run build:esm - run: npm run test:node env: @@ -129,7 +129,7 @@ jobs: with: node-version: ${{ env.NODE_JS }} - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - run: npm run build:esm - run: npm run test:node env: @@ -170,7 +170,7 @@ jobs: git fetch origin git checkout origin/master - - uses: bahmutov/npm-install@v1 + - uses: ./.github/actions/npm - name: build nwaku run: |