mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-02-06 02:51:07 +08:00
feat(release): add platform input for release workflow and adjust OS matrix based on input
- Introduced a new input parameter 'platform' to specify the build platform (all, windows, mac, linux). - Updated the job strategy matrix to dynamically select OS based on the provided platform input, enhancing flexibility in the release process.
This commit is contained in:
parent
8ab07e9e4c
commit
dd73d3d309
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@ -7,6 +7,16 @@ on:
|
||||
description: "Release tag (e.g. v1.0.0)"
|
||||
required: true
|
||||
default: "v1.0.0"
|
||||
platform:
|
||||
description: "Build platform"
|
||||
required: true
|
||||
default: "all"
|
||||
type: choice
|
||||
options:
|
||||
- all
|
||||
- windows
|
||||
- mac
|
||||
- linux
|
||||
push:
|
||||
tags:
|
||||
- v*.*.*
|
||||
@ -20,7 +30,14 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
os: ${{ fromJSON(
|
||||
github.event_name == 'push' && '["macos-latest", "windows-latest", "ubuntu-latest"]' ||
|
||||
github.event.inputs.platform == 'all' && '["macos-latest", "windows-latest", "ubuntu-latest"]' ||
|
||||
github.event.inputs.platform == 'linux' && '["ubuntu-latest"]' ||
|
||||
github.event.inputs.platform == 'windows' && '["windows-latest"]' ||
|
||||
github.event.inputs.platform == 'mac' && '["macos-latest"]' ||
|
||||
'["macos-latest", "windows-latest", "ubuntu-latest"]'
|
||||
) }}
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user