From e693a6057ee2e41b1312c0f654185697876d742a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 15 Apr 2024 00:22:46 +0800 Subject: [PATCH 1/2] chore:release --- .github/workflows/release.yml | 72 ++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc74b99a..f8a3855d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,23 +1,67 @@ -name: "publish" +name: "release" on: push: tags: - "v*" jobs: - build-and-publish: + build-linux: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target_platform: [linux,darwin] + target_arch: [x64, arm64] steps: - - name: checkout - uses: actions/checkout@v3 - - - name: setup node - uses: actions/setup-node@v2 + - name: Clone Main Repository + uses: actions/checkout@v4 with: - node-version: 18 - - - name: install dependenies - run: export ELECTRON_SKIP_BINARY_DOWNLOAD=1 && npm install - - - name: build - run: npm run build:prod + repository: 'NapNeko/NapCat' + submodules: true + token: ${{ secrets.NAPCAT_BUILD }} + - name: Use Node.js 20.X + uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Build NuCat Linux + run: | + npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }} + npm run build:prod + cd dist + npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }} + cd .. + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }} + path: dist + build-win32: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target_platform: [win32] + target_arch: [x64] + steps: + - name: Clone Main Repository + uses: actions/checkout@v4 + with: + repository: 'NapNeko/NapCat' + submodules: true + token: ${{ secrets.NAPCAT_BUILD }} + - name: Use Node.js 20.X + uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Build NuCat Linux + run: | + npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }} + npm run build:prod + cd dist + npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }} + cd .. + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }} + path: dist From 8d65b1427d7005c680abe168ed3b5fbb73f90bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 15 Apr 2024 00:28:22 +0800 Subject: [PATCH 2/2] chore:version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55866876..1806eb05 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "napcat", "private": true, "type": "module", - "version": "0.0.1", + "version": "1.0.0", "scripts": { "watch:dev": "vite --mode development", "watch:prod": "vite --mode production",