From bb8cd4e404f77a697914dbc8d4e66984e6197776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Sun, 11 Jun 2023 20:25:50 +0800 Subject: [PATCH] update github actions --- .github/workflows/nodejs.yml | 6 ++--- .github/workflows/npmpublish.yml | 45 +++++++++----------------------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4aa7704..58597e8 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '18' cache: 'npm' - run: npm ci - run: npm test diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index f6f5162..f49b270 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -11,18 +11,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 12 - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-npm-timechart-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-timechart- - ${{ runner.os }}-npm- + node-version: 18 + cache: 'npm' - run: npm ci - run: npm test @@ -30,19 +23,12 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 registry-url: https://registry.npmjs.org/ - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-npm-timechart-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-timechart- - ${{ runner.os }}-npm- + cache: 'npm' - run: npm ci - run: | TAG=$(node <