@@ -14,9 +14,13 @@ inputs:
1414 required : false
1515 default : x86_64-unknown-linux-gnu
1616 macos-suffix :
17- description : The suffix to add to Linux binaries
17+ description : The suffix to add to macOS binaries
1818 required : false
1919 default : x86_64-apple-darwin
20+ macos-arm-suffix :
21+ description : The suffix to add to macOS ARM binaries
22+ required : false
23+ default : aarch64-apple-darwin
2024
2125outputs :
2226 name :
3943 WINDOWS_SUFFIX : ${{ inputs.windows-suffix }}
4044 LINUX_SUFFIX : ${{ inputs.linux-suffix }}
4145 MACOS_SUFFIX : ${{ inputs.macos-suffix }}
46+ MACOS_ARM_SUFFIX : ${{ inputs.macos-arm-suffix }}
4247 run : |
4348 set -euo pipefail
4449
50+ echo "RUNNER_OS=$RUNNER_OS"
51+
4552 if [ "$RUNNER_OS" == "Linux" ]; then
4653 suffix="$LINUX_SUFFIX"
4754 target_file="$FILENAME"
@@ -51,15 +58,25 @@ runs:
5158 target_file="$FILENAME.exe"
5259 source_file="$FILENAME-$suffix.exe"
5360 elif [ "$RUNNER_OS" == "macOS" ]; then
54- suffix="$MACOS_SUFFIX"
61+ echo "\$(uname -m)=$(uname -m)"
62+ if [ "$(uname -m)" == "arm64" ]; then
63+ suffix="$MACOS_ARM_SUFFIX"
64+ else
65+ suffix="$MACOS_SUFFIX"
66+ fi
5567 target_file="$FILENAME"
5668 source_file="$FILENAME-$suffix"
5769 else
5870 echo "$RUNNER_OS not supported"
5971 exit 1
6072 fi
6173
74+ echo "name-with-arch=$source_file"
6275 echo "name-with-arch=$source_file" >> "$GITHUB_OUTPUT"
76+
77+ echo "name=$target_file"
6378 echo "name=$target_file" >> "$GITHUB_OUTPUT"
79+
80+ echo "suffix=$suffix"
6481 echo "suffix=$suffix" >> "$GITHUB_OUTPUT"
6582 shell : bash
0 commit comments