From 6a40c6a93b45e70c9a28a9ec5a600db1c7851d8c Mon Sep 17 00:00:00 2001 From: Phil Hale Date: Thu, 11 May 2023 12:57:30 +0100 Subject: [PATCH] chore: Update CI and release workflows * Update deprecated set-output command. * Update actions to use Node 16 rather than Node 12. --- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/release.yml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cba96d61..24f8281bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: should-skip-job: ${{steps.skip-check.outputs.should_skip}} steps: - id: skip-check - uses: fkirc/skip-duplicate-actions@v2.1.0 + uses: fkirc/skip-duplicate-actions@v5.3.0 with: github_token: ${{github.token}} @@ -23,10 +23,10 @@ jobs: steps: - id: test-type-fork if: ${{github.event.pull_request.head.repo.fork}} - run: echo '::set-output name=test_type::["unit", "coverage"]' + run: echo 'test_type=["unit", "coverage"]' >> $GITHUB_OUTPUT - id: test-type if: ${{!github.event.pull_request.head.repo.fork}} - run: echo '::set-output name=test_type::["unit", "playback", "playback-min", "coverage"]' + run: echo 'test_type=["unit", "playback", "playback-min", "coverage"]' >> $GITHUB_OUTPUT ci: @@ -45,10 +45,10 @@ jobs: runs-on: ${{matrix.os}} steps: - name: checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: read node version from .nvmrc - run: echo ::set-output name=NVMRC::$(cat .nvmrc) + run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT shell: bash id: nvm @@ -65,7 +65,7 @@ jobs: if: ${{startsWith(matrix.os, 'ubuntu')}} - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '${{steps.nvm.outputs.NVMRC}}' cache: npm @@ -79,12 +79,12 @@ jobs: run: npm i --prefer-offline --no-audit - name: run npm test - uses: GabrielBB/xvfb-action@v1 + uses: coactions/setup-xvfb@v1 with: run: npm run test - name: coverage - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{secrets.CODECOV_TOKEN}} files: './test/dist/coverage/coverage-final.json' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e457c629..6deb9563e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,19 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 # We neeed to fetch the entire history as conventional-changelog needs # access to any number of git commits to build the changelog. with: fetch-depth: 0 - name: read node version from .nvmrc - run: echo ::set-output name=NVMRC::$(cat .nvmrc) + run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT shell: bash id: nvm - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '${{steps.nvm.outputs.NVMRC}}' cache: npm @@ -42,7 +42,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Check if this is a pre-release - run: echo ::set-output name=IS_PRE_RELEASE::$(npx -p not-prerelease is-prerelease && echo "true" || echo "false") + run: echo "IS_PRE_RELEASE=$(npx -p not-prerelease is-prerelease && echo "true" || echo "false")" >> $GITHUB_OUTPUT id: pre-release-check - name: truncate CHANGELOG.md so that we can get the current versions changes only @@ -52,7 +52,7 @@ jobs: run: npx -p @videojs/update-changelog vjs-update-changelog --run-on-prerelease - name: get dashed package version for netlify - run: echo ::set-output name=VERSION::$(node -e "process.stdout.write(require('./package.json').version.split('.').join('-'))") + run: echo "VERSION=$(node -e "process.stdout.write(require('./package.json').version.split('.').join('-'))")" >> $GITHUB_OUTPUT id: get-version shell: bash if: env.NETLIFY_BASE != ''