👷 map build condition

This commit is contained in:
niuhuan 2024-04-02 13:36:48 +08:00
parent a7ecfbd7d7
commit f47f58bcee
1 changed files with 3 additions and 5 deletions

View File

@ -2,20 +2,18 @@ name: Package
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
package-ios: PACKAGE_IOS:
type: boolean type: boolean
default: false default: false
description: 'iOS version' description: 'iOS version'
required: true required: true
package-android: PACKAGE_ANDROID:
type: boolean type: boolean
default: false default: false
description: 'Android version' description: 'Android version'
required: true required: true
env: env:
PACKAGE_IOS: ${{ github.event.inputs.message }}
PACKAGE_ANDROID: ${{ github.event.inputs.message }}
FLUTTER_VERSION: '3.7.3' FLUTTER_VERSION: '3.7.3'
GO_VERSION: '1.18' GO_VERSION: '1.18'
@ -34,7 +32,7 @@ jobs:
- name: need_build - name: need_build
id: need_build id: need_build
run: | run: |
if [ ${{ matrix.config.target }} == 'android' ] && [ ${{ env.PACKAGE_ANDROID }} == 'true' ]; then if [ '${{ matrix.config.target }}' == 'android' ] && [ ${{ ${{ github.event.inputs.PACKAGE_IOS }}.PACKAGE_ANDROID }} == 'true' ]; then
echo "::set-output name=need_build::true" echo "::set-output name=need_build::true"
elif [ ${{ matrix.config.target }} == 'ios' ] && [ ${{ env.PACKAGE_IOS }} == 'true' ]; then elif [ ${{ matrix.config.target }} == 'ios' ] && [ ${{ env.PACKAGE_IOS }} == 'true' ]; then
echo "::set-output name=need_build::true" echo "::set-output name=need_build::true"