From b2e3df488c4dbe272da79d08a37cd794b1a8a599 Mon Sep 17 00:00:00 2001 From: Pascal Reitermann Date: Tue, 4 Apr 2023 21:58:27 +0200 Subject: [PATCH] Define NODE_VERSION as variable --- .github/workflows/action.yml | 9 +++++++-- .github/workflows/publish.yml | 14 +++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 8fe48eb..1ae5a14 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,4 +1,5 @@ name: github-action + on: push: branches: @@ -6,6 +7,10 @@ on: pull_request: branches: - '*' + +env: + NODE_VERSION: 16 + jobs: build: runs-on: ubuntu-latest @@ -13,10 +18,10 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Setup Node.js + - name: Setup Node ${{env.NODE_VERSION}} uses: actions/setup-node@v3 with: - node-version: 16 + node-version: ${{env.NODE_VERSION}} - name: install run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8fa1cf0..bde0b39 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,24 @@ name: publish + on: push: tags: - '*' + +env: + NODE_VERSION: 16 + jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node ${{env.NODE_VERSION}} + uses: actions/setup-node@v3 with: - node-version: 16 + node-version: ${{env.NODE_VERSION}} - name: Install dependencies run: npm i