Skip to content

Commit 910586c

Browse files
authored
Handle .exe extensions for windows native-image
1 parent 250fa9b commit 910586c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989
os: [ubuntu-latest, macos-latest, windows-latest]
9090
env:
9191
SUFFIX: ${{fromJson('{"ubuntu-latest":"linux-x86-64", "macos-latest":"darwin-arm64", "windows-latest":"windows-x86-64"}')[matrix.os]}}
92+
EXTENSION: ${{ matrix.os == 'windows-latest' && '.exe' || '' }}
9293
steps:
9394
- name: "Check out repository"
9495
uses: actions/checkout@v4
@@ -103,9 +104,9 @@ jobs:
103104
- name: "Native"
104105
run: mvn -Pnative -DskipTests package -pl core -am
105106
- name: "Move outputs"
106-
run: cp core/target/google-java-format google-java-format_${{ env.SUFFIX }}
107+
run: cp core/target/google-java-format${{ env.EXTENSION }} google-java-format_${{ env.SUFFIX }}${{ env.EXTENSION }}
107108
- name: "Upload native-image"
108109
env:
109110
GH_TOKEN: ${{ github.token }}
110111
GH_REPO: ${{ github.repository }}
111-
run: gh release upload "v${{ github.event.inputs.version }}" "google-java-format_${{ env.SUFFIX }}"
112+
run: gh release upload "v${{ github.event.inputs.version }}" "google-java-format_${{ env.SUFFIX }}${{ env.EXTENSION }}"

0 commit comments

Comments
 (0)