Skip to content

Commit e093609

Browse files
committed
env
1 parent 489b127 commit e093609

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/go-build.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,27 @@ jobs:
7070
GOOS="${INPUT_PLATFORM:-$GOHOSTOS}"
7171
echo "GOOS=$GOOS" >>"$GITHUB_ENV"
7272
73+
cmd=bash
7374
if [[ $GOHOSTOS = windows && $CGO_ENABLED = 1 ]]
7475
then
76+
cmd='msys2 {0}'
7577
case "$GOARCH" in
7678
*64)
7779
echo 'MSYS=MINGW64' >>"$GITHUB_ENV" ;;
7880
*)
7981
echo 'MSYS=MINGW32' >>"$GITHUB_ENV" ;;
8082
esac
8183
fi
84+
echo "CMD=$cmd" >>"$GITHUB_ENV"
8285
shell: bash
8386
- if: env.MSYS != ''
8487
uses: msys2/setup-msys2@v2
8588
with:
8689
msystem: ${{ env.MSYS }}
8790
path-type: inherit
8891
install: mingw-w64-i686-gcc
89-
- if: env.MSYS == ''
90-
run: ${{ inputs.run }}
91-
shell: bash
92-
- if: env.MSYS != ''
93-
run: ${{ inputs.run }}
94-
shell: msys2 {0}
92+
- run: ${{ inputs.run }}
93+
shell: ${{ env.CMD }}
9594
- if: inputs.upload-artifact-path != ''
9695
uses: actions/upload-artifact@v4
9796
with:

0 commit comments

Comments
 (0)