@@ -102,19 +102,28 @@ jobs:
102102 - uses : yuchanns/actions-luamake@v1.0.0
103103 with :
104104 luamake-version : " 5bedfce66f075a9f68b1475747738b81b3b41c25"
105- - name : Build
105+ - name : Build (Windows)
106+ if : runner.os == 'Windows'
107+ shell : powershell
108+ id : build-windows
109+ run : |
110+ luamake precompile
111+ luamake soluna
112+ $SOLUNA_BINARY = "soluna.exe"
113+ $RENAME_BINARY = "soluna-windows-amd64.exe"
114+ $SOLUNA_PATH = (Get-ChildItem -Path "bin" -Name $SOLUNA_BINARY -Recurse | Select-Object -First 1)
115+ Copy-Item "bin\$SOLUNA_PATH" "bin\$RENAME_BINARY"
116+ echo "SOLUNA_PATH=bin/$RENAME_BINARY" >> $env:GITHUB_OUTPUT
117+ echo "SOLUNA_BINARY=$RENAME_BINARY" >> $env:GITHUB_OUTPUT
118+ - name : Build (Unix)
119+ if : runner.os != 'Windows'
106120 shell : bash
107- id : build
121+ id : build-unix
108122 run : |
109123 luamake precompile
110124 luamake soluna
111- if [[ "$RUNNER_OS" == "Windows" ]]; then
112- SOLUNA_BINARY="soluna.exe"
113- RENAME_BINARY="soluna-windows-amd64.exe"
114- else
115- SOLUNA_BINARY="soluna"
116- RENAME_BINARY="soluna-macos-arm64"
117- fi
125+ SOLUNA_BINARY="soluna"
126+ RENAME_BINARY="soluna-macos-arm64"
118127 SOLUNA_PATH=$(find bin -name $SOLUNA_BINARY | head -n 1)
119128 cp "$SOLUNA_PATH" "bin/$RENAME_BINARY"
120129 echo "SOLUNA_PATH=bin/$RENAME_BINARY" >> $GITHUB_OUTPUT
@@ -123,9 +132,9 @@ jobs:
123132 name : Upload
124133 if : github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
125134 with :
126- name : " soluna-${{ runner.os }}-${{ steps.build.outputs.SOLUNA_BINARY }}"
135+ name : " soluna-${{ runner.os }}-${{ runner.os == 'Windows' && steps.build-windows.outputs.SOLUNA_BINARY || steps.build-unix .outputs.SOLUNA_BINARY }}"
127136 if-no-files-found : " error"
128- path : " ${{ steps.build.outputs.SOLUNA_PATH }}"
137+ path : " ${{ runner.os == 'Windows' && steps.build-windows.outputs.SOLUNA_PATH || steps.build-unix .outputs.SOLUNA_PATH }}"
129138 overwrite : " true"
130139 release :
131140 name : Create Nightly Release
0 commit comments