From 59048aef6b2775ebd3148ea05254a9382926030e Mon Sep 17 00:00:00 2001 From: MengYX Date: Thu, 16 Dec 2021 07:25:10 +0800 Subject: [PATCH] maintenance: update ci (cherry picked from commit 3960ea7d591a199c188e764b26d0840ccae1c322) --- .github/workflows/build.yml | 31 ++++++++++------------------- .github/workflows/release-build.yml | 4 ++-- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef36174..2fcd60a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,6 @@ on: - "package.json" - jobs: build: runs-on: ubuntu-latest @@ -37,38 +36,30 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v2 with: - node-version: "14" + node-version: "16" - name: Install Dependencies run: npm ci - name: Build - env: - GZIP: "--best" - run: | - npm run build ${{ matrix.BUILD_ARGS }} - tar -czvf dist.tar.gz -C ./dist . - - - name: Build Extension - if: ${{ matrix.BUILD_EXTENSION }} - run: | - npm run make-extension - cd dist - zip -rJ9 ../extension.zip * - cd .. + run: npm run build ${{ matrix.BUILD_ARGS }} - name: Publish artifact uses: actions/upload-artifact@v2 with: - name: unlock-music-${{ matrix.build }}.tar.gz - path: ./dist.tar.gz + name: ${{ matrix.build }} + path: ./dist + + - name: Build Extension + if: ${{ matrix.BUILD_EXTENSION }} + run: npm run make-extension - name: Publish artifact - Extension if: ${{ matrix.BUILD_EXTENSION }} uses: actions/upload-artifact@v2 with: - name: extension.zip - path: ./extension.zip + name: extension + path: ./dist diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index d8ce703..01d8479 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -11,10 +11,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 14.x + - name: Use Node.js 16.x uses: actions/setup-node@v2 with: - node-version: "14" + node-version: "16" - name: Install Dependencies run: npm ci