Skip to content

Commit

Permalink
ci: update GitHub Actions versions and Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Jan 22, 2024
1 parent 1addff4 commit 86cea75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
echo 'The pull request has not been merged'
exit 1
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -33,9 +33,9 @@ jobs:
git config user.email [email protected]
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
registry-url: "https://registry.npmjs.org"

- name: Setup .npmrc
Expand Down Expand Up @@ -82,15 +82,15 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: Push changes
uses: ad-m/github-push-action@v0.6.0
uses: ad-m/github-push-action@v0.8.0
if: env.PREV_VERSION != env.CURRENT_VERSION
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true

- name: Create comment
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
if: env.PREV_VERSION != env.CURRENT_VERSION
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
${{ runner.os }}-yarn-
- name: Install global dependencies
run: npm i yarn -g
Expand All @@ -51,6 +51,6 @@ jobs:
run: npm run coverage

- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 86cea75

Please sign in to comment.