From 54ea9bc6db917edca13c7d161241cb1034716409 Mon Sep 17 00:00:00 2001 From: CzBiX Date: Tue, 1 Sep 2020 23:02:49 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebefe7c..9ca98da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,21 @@ on: pull_request: branches: [ master ] +env: + TZ: Asia/Shanghai + jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - name: Use Node.js uses: actions/setup-node@v1 - - run: yarn install + - run: yarn install --frozen-lockfile - run: yarn run lint - run: yarn run test:unit @@ -23,13 +30,18 @@ jobs: if: ${{ github.event_name == 'push' }} steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - name: Use Node.js uses: actions/setup-node@v1 - - run: yarn install + - run: yarn install --frozen-lockfile - name: Set Env run: | - export TZ=Asia/Shanghai COMMIT_ID=${${{ github.sha }}::6} - export GIT_TAG=nightly-$COMMIT_ID RELEASE_TITLE=$(date +'%Y%m%d-%H%M%S') + export COMMIT_ID=${${{ github.sha }}::6} + export GIT_TAG=nightly-$COMMIT_ID + export RELEASE_TITLE=$(date +'%Y%m%d-%H%M%S') export RELEASE_FILE=qb-web-$RELEASE_TITLE.zip - name: Pack Release run: |