refactor: simplify macOS job configuration and improve caching
This commit is contained in:
18
.github/workflows/dev.yml
vendored
18
.github/workflows/dev.yml
vendored
@@ -13,11 +13,6 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
run_macos_x86_64:
|
||||
description: "运行 macOS x86_64"
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
permissions: write-all
|
||||
env:
|
||||
@@ -45,14 +40,13 @@ jobs:
|
||||
bundle: dmg
|
||||
id: macos-aarch64
|
||||
input: run_macos_aarch64
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
bundle: dmg
|
||||
id: macos-x86_64
|
||||
input: run_macos_x86_64
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Skip job if not selected
|
||||
if: github.event.inputs[matrix.input] != 'true'
|
||||
run: echo "Job ${{ matrix.id }} skipped as requested"
|
||||
|
||||
- name: Checkout Repository
|
||||
if: github.event.inputs[matrix.input] == 'true'
|
||||
uses: actions/checkout@v4
|
||||
@@ -71,7 +65,7 @@ jobs:
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
save-if: false
|
||||
cache-all-crates: false
|
||||
cache-all-crates: true
|
||||
shared-key: autobuild-shared
|
||||
|
||||
- name: Install Node
|
||||
@@ -79,6 +73,7 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "pnpm"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
@@ -93,6 +88,7 @@ jobs:
|
||||
pnpm run prebuild ${{ matrix.target }}
|
||||
|
||||
- name: Release ${{ env.TAG_CHANNEL }} Version
|
||||
if: github.event.inputs[matrix.input] == 'true'
|
||||
run: pnpm release-version ${{ env.TAG_NAME }}
|
||||
|
||||
- name: Tauri build
|
||||
|
||||
Reference in New Issue
Block a user