Skip to content

Commit

Permalink
Abstract default node & os versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pgilad committed Jun 3, 2024
1 parent 3948f44 commit 4ce1471
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on: [push]

env:
DEFAULT_NODE_VERSION: '20.x'
DEFAULT_OS_VERSION: 'ubuntu-latest'
CI: true
HUSKY: 0

Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
- name: Reporter CLI smoke test
run: node ./dist/cli/leasot-reporter.js --help

- if: matrix.node-version == env.DEFAULT_NODE_VERSION && matrix.os == 'ubuntu-latest'
- if: matrix.node-version == env.DEFAULT_NODE_VERSION && matrix.os == env.DEFAULT_OS_VERSION
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-${{ matrix.node-version }}
Expand All @@ -81,7 +82,7 @@ jobs:
deploy-docs:
name: Deploy Docs
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
runs-on: ${{ env.DEFAULT_OS_VERSION }}
needs: build
steps:
- uses: actions/download-artifact@v4
Expand All @@ -96,7 +97,7 @@ jobs:
deploy-npm:
name: Deploy NPM
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
runs-on: ${{ env.DEFAULT_OS_VERSION }}
needs: build
steps:
- uses: actions/download-artifact@v4
Expand Down

0 comments on commit 4ce1471

Please sign in to comment.