Skip to content

Commit

Permalink
Build against several node-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Sep 16, 2024
1 parent a8d7000 commit 25cf2e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ jobs:
build-and-publish:
name: Build and Publish
runs-on: self-hosted-hoprnet-small

strategy:
matrix:
node-version: [20.x, 21.x, 22.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20
node-version: ${{ matrix.node-version }}

- name: Setup GCP
id: gcp
Expand All @@ -42,6 +44,7 @@ jobs:
run: yarn test

- name: Publish next version
if: matrix.node-version == vars.NODE_VERSION
run: |
BUILD_DATE=$(date +%Y%m%d%H%M%S)
PR_VERSION=$(node -p "require('./package.json').version")-pr.${{ github.event.pull_request.number }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20
node-version: ${{ vars.NODE_VERSION }}

- name: Setup GCP
id: gcp
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Node.js
uses: hoprnet/hopr-workflows/actions/setup-node-js@master
with:
node-version: 20
node-version: ${{ vars.NODE_VERSION }}

- name: Setup GCP
id: gcp
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ vars.NODE_VERSION }}
cache: 'yarn'
cache-dependency-path: ./yarn.lock
registry-url: https://registry.npmjs.org
Expand Down

0 comments on commit 25cf2e0

Please sign in to comment.