From e0bf419e91bbcb5da2033340b014b716e9d25470 Mon Sep 17 00:00:00 2001 From: Sunner Sun Date: Mon, 7 Oct 2024 13:26:52 +0800 Subject: [PATCH] chore: split release workflow to 3 jobs May supress the build error --- .github/workflows/release.yml | 62 ++++++++++++++++++++++++++++++----- package.json | 7 ++-- 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 467fcbbe8f..986a357cce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,18 +3,17 @@ name: Build and Release on: push: tags: - - v* + - "v*.*.*" jobs: - build-and-release: + build-and-release-macos: runs-on: macos-latest - steps: - - name: Checkout Git repository + - name: Checkout code uses: actions/checkout@v2 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: "18.x" @@ -24,8 +23,7 @@ jobs: python-version: "3.11" - name: Install dependencies - run: | - npm install + run: npm install - name: Build and release env: @@ -36,4 +34,52 @@ jobs: APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} run: | export PYTHON_PATH=`which python` - npm run release + npm run release-macos + + build-and-release-ubuntu: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "18.x" + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: npm install + + - name: Build and release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run release-linux + + build-and-release-windows: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "18.x" + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: npm install + + - name: Build and release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run release-windows diff --git a/package.json b/package.json index 44570020cd..39d40c6eba 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,10 @@ "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", "start": "electron .", - "release": "vue-cli-service electron:build -wml --x64 --arm64", + "release-all": "vue-cli-service electron:build -wml --x64 --arm64", + "release-macos": "vue-cli-service electron:build --mac --x64 --arm64", + "release-linux": "vue-cli-service electron:build --linux --x64 --arm64", + "release-windows": "vue-cli-service electron:build --win --x64 --arm64", "prepare": "husky install" }, "dependencies": { @@ -117,4 +120,4 @@ "electron-builder": "^24.13.3" } } -} +} \ No newline at end of file