From f455422472a558d48d939e77a65cdcec38e707b5 Mon Sep 17 00:00:00 2001 From: Cardinal Date: Mon, 1 Apr 2024 21:42:16 +0200 Subject: [PATCH] update node version --- .github/workflows/node.js.yml | 17 +++++++---------- action.yml | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d506478..dfa49b7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,26 +12,23 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [20.x] steps: - - uses: actions/checkout@v2 - - name: Extract branch name - id: extractBranch - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Build run: npm run build - name: Pack run: npm run pack - name: Check packed js changes id: packedJsStatus - run: echo ::set-output name=changes::$(git status ${{ env.PACKED_JS_PATH }} --porcelain) + run: echo "changes=$(git status ${{ env.PACKED_JS_PATH }} --porcelain)" >> $GITHUB_OUTPUT - name: Commit packed js id: commitPackedJs if: steps.packedJsStatus.outputs.changes @@ -47,4 +44,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} tags: true force: true - branch: ${{ steps.extractBranch.outputs.branch }} \ No newline at end of file + branch: ${{ github.head_ref || github.ref_name }} \ No newline at end of file diff --git a/action.yml b/action.yml index 0004e7f..7f07dbf 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ outputs: accessToken: description: 'Fetched access token' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' branding: icon: 'lock'