From dd30a56f158f7d0dbd9a1b5d86941a7ac65d12e7 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 18:26:08 +1000 Subject: [PATCH 1/5] fix(ci): caching is already handled by npm-install action --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73d3310767..7da24dfaee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,12 +42,6 @@ jobs: cd nim-waku/build ./wakunode2 --help - - name: Cache npm cache - uses: actions/cache@v2 - with: - path: ~/.npm - key: node-${{ matrix.os }}-${{ matrix.node }}-v1-${{ hashFiles('**/package-lock.json') }} - - name: install using npm ci uses: bahmutov/npm-install@v1 From 8d1b461d61ba649062c10e8266c8337180aeb6dc Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 18:26:46 +1000 Subject: [PATCH 2/5] chore(ci): upgrade setup-node action to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7da24dfaee..17b358ff9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: tar xavf nim-waku-ubuntu-latest.tar.gz - name: Install NodeJS - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} From fd54d21e1a154d8123bcd2a66a42888556f96f1a Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 18:28:57 +1000 Subject: [PATCH 3/5] refactor(ci): move node to env var, move env var up So it can be used by all jobs. --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17b358ff9d..1d9864a9a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,15 @@ on: - "trying" pull_request: +env: + BUF_VERSION: "0.56.0" + NIM_WAKU_VERSION: "v0.9" + NODE_JS: "16" + jobs: build_and_test: - env: - BUF_VERSION: "0.56.0" - NIM_WAKU_VERSION: "v0.9" strategy: matrix: - node: [16] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: @@ -33,7 +34,7 @@ jobs: - name: Install NodeJS uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: ${{ env.NODE_JS }} - name: Ensure wakunode2 is ready shell: bash From 215aa59b7733fd1a552b1e9d2b7e808765d26216 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 19:22:35 +1000 Subject: [PATCH 4/5] feat(ci): published merged PRs --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d9864a9a5..e9530e927a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,3 +72,33 @@ jobs: with: name: nim-waku-logs path: log/ + + release_next: + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: [build_and_test] + steps: + - name: Checkout code + uses: actions/checkout@v2.3.3 + + - name: Install NodeJS + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_JS }} + + - name: install using npm ci + uses: bahmutov/npm-install@v1 + + - name: Append git hash to version + shell: bash + run: | + CURR_VERSION=$(cat package.json | jq .version | tr -d '"') + GIT_HASH=$(git rev-parse --short HEAD) + cat package.json| jq --arg version "$CURR_VERSION-$GIT_HASH" '.version |= $version' > _package.json + mv -f _package.json package.json + + - name: Authenticate with registry + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ./.npmrc + + - name: publish + run: npm publish --tag next --access public From db6e7921d52cd787e08df1d1000000ea4bfee1c9 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Fri, 19 Aug 2022 23:10:35 +1000 Subject: [PATCH 5/5] ci: test name has changed --- bors.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bors.toml b/bors.toml index 0bfbf9b5d3..a5772cdb39 100644 --- a/bors.toml +++ b/bors.toml @@ -1,5 +1,5 @@ status = [ - "build_and_test (16, ubuntu-latest)", + "build_and_test (ubuntu-latest)", "examples_build_and_test (eth-pm)", "examples_build_and_test (eth-pm-wallet-encryption)", "examples_build_and_test (relay-angular-chat)",