Skip to content

Commit af2a6cb

Browse files
Fix native executable github action
1 parent a61c7c9 commit af2a6cb

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/create-github-release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
java-version: "21"
2424
distribution: "graalvm"
25-
components: "native-image"
2625

2726
- name: Build native image
2827
run: mvn -B clean package -Pnative
@@ -43,12 +42,17 @@ jobs:
4342
run: |
4443
VERSION=${GITHUB_REF_NAME}
4544
OS_NAME=${{ matrix.os }}
46-
SAFE_OS_NAME=$(echo "$OS_NAME" | sed 's/-latest//')
45+
case "$OS_NAME" in
46+
ubuntu-latest) SAFE_OS_NAME="linux" ;;
47+
windows-latest) SAFE_OS_NAME="windows" ;;
48+
macos-latest) SAFE_OS_NAME="macos" ;;
49+
*) SAFE_OS_NAME="$OS_NAME" ;;
50+
esac
4751
ZIP_NAME="jfiletreeprettyprinter-${VERSION}-${SAFE_OS_NAME}.zip"
4852
4953
cd dist
5054
tar -a -c -f "$ZIP_NAME" *
51-
echo "zip_path=$(pwd)/$ZIP_NAME" >> $GITHUB_OUTPUT
55+
echo "zip_path=dist/$ZIP_NAME" >> $GITHUB_OUTPUT
5256
cd ..
5357
5458
- name: Upload artifact

0 commit comments

Comments
 (0)