Browse Source
maintenance: update ci
(cherry picked from commit 3960ea7d591a199c188e764b26d0840ccae1c322)
20230320
MengYX
3 years ago
No known key found for this signature in database
GPG Key ID: E63F9C7303E8F604
2 changed files with
13 additions and
22 deletions
-
.github/workflows/build.yml
-
.github/workflows/release-build.yml
|
@ -20,7 +20,6 @@ on: |
|
|
- "package.json" |
|
|
- "package.json" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
jobs: |
|
|
build: |
|
|
build: |
|
|
runs-on: ubuntu-latest |
|
|
runs-on: ubuntu-latest |
|
@ -37,38 +36,30 @@ jobs: |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v2 |
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
- name: Use Node.js 14.x |
|
|
- name: Use Node.js 16.x |
|
|
uses: actions/setup-node@v2 |
|
|
uses: actions/setup-node@v2 |
|
|
with: |
|
|
with: |
|
|
node-version: "14" |
|
|
node-version: "16" |
|
|
|
|
|
|
|
|
- name: Install Dependencies |
|
|
- name: Install Dependencies |
|
|
run: npm ci |
|
|
run: npm ci |
|
|
|
|
|
|
|
|
- name: Build |
|
|
- name: Build |
|
|
env: |
|
|
run: npm run build ${{ matrix.BUILD_ARGS }} |
|
|
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 .. |
|
|
|
|
|
|
|
|
|
|
|
- name: Publish artifact |
|
|
- name: Publish artifact |
|
|
uses: actions/upload-artifact@v2 |
|
|
uses: actions/upload-artifact@v2 |
|
|
with: |
|
|
with: |
|
|
name: unlock-music-${{ matrix.build }}.tar.gz |
|
|
name: ${{ matrix.build }} |
|
|
path: ./dist.tar.gz |
|
|
path: ./dist |
|
|
|
|
|
|
|
|
|
|
|
- name: Build Extension |
|
|
|
|
|
if: ${{ matrix.BUILD_EXTENSION }} |
|
|
|
|
|
run: npm run make-extension |
|
|
|
|
|
|
|
|
- name: Publish artifact - Extension |
|
|
- name: Publish artifact - Extension |
|
|
if: ${{ matrix.BUILD_EXTENSION }} |
|
|
if: ${{ matrix.BUILD_EXTENSION }} |
|
|
uses: actions/upload-artifact@v2 |
|
|
uses: actions/upload-artifact@v2 |
|
|
with: |
|
|
with: |
|
|
name: extension.zip |
|
|
name: extension |
|
|
path: ./extension.zip |
|
|
path: ./dist |
|
|
|
@ -11,10 +11,10 @@ jobs: |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v2 |
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
- name: Use Node.js 14.x |
|
|
- name: Use Node.js 16.x |
|
|
uses: actions/setup-node@v2 |
|
|
uses: actions/setup-node@v2 |
|
|
with: |
|
|
with: |
|
|
node-version: "14" |
|
|
node-version: "16" |
|
|
|
|
|
|
|
|
- name: Install Dependencies |
|
|
- name: Install Dependencies |
|
|
run: npm ci |
|
|
run: npm ci |
|
|