Skip to content

Commit

Permalink
chore: split release workflow to 3 jobs
Browse files Browse the repository at this point in the history
May supress the build error
  • Loading branch information
sunner committed Oct 7, 2024
1 parent 92348a5 commit e0bf419
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 10 deletions.
62 changes: 54 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -24,8 +23,7 @@ jobs:
python-version: "3.11"

- name: Install dependencies
run: |
npm install
run: npm install

- name: Build and release
env:
Expand All @@ -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
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -117,4 +120,4 @@
"electron-builder": "^24.13.3"
}
}
}
}

0 comments on commit e0bf419

Please sign in to comment.