Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
lufia committed Feb 29, 2024
1 parent 489b127 commit e093609
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,27 @@ jobs:
GOOS="${INPUT_PLATFORM:-$GOHOSTOS}"
echo "GOOS=$GOOS" >>"$GITHUB_ENV"
cmd=bash
if [[ $GOHOSTOS = windows && $CGO_ENABLED = 1 ]]
then
cmd='msys2 {0}'
case "$GOARCH" in
*64)
echo 'MSYS=MINGW64' >>"$GITHUB_ENV" ;;
*)
echo 'MSYS=MINGW32' >>"$GITHUB_ENV" ;;
esac
fi
echo "CMD=$cmd" >>"$GITHUB_ENV"
shell: bash
- if: env.MSYS != ''
uses: msys2/setup-msys2@v2
with:
msystem: ${{ env.MSYS }}
path-type: inherit
install: mingw-w64-i686-gcc
- if: env.MSYS == ''
run: ${{ inputs.run }}
shell: bash
- if: env.MSYS != ''
run: ${{ inputs.run }}
shell: msys2 {0}
- run: ${{ inputs.run }}
shell: ${{ env.CMD }}
- if: inputs.upload-artifact-path != ''
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit e093609

Please sign in to comment.