Skip to content

Commit ba758c9

Browse files
committed
fix zip on windows
1 parent d631838 commit ba758c9

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,21 @@ jobs:
117117
shell: bash
118118
run: pnpm tauri build
119119

120-
- name: Set artifact path
121-
id: artifact_path
122-
shell: bash
123-
run: |
124-
if [[ "${{ runner.os }}" == "Windows" ]]; then
125-
echo "artifact_path=src-tauri/target/release/bundle/nsis/" >> $GITHUB_ENV
126-
else
127-
echo "artifact_path=src-tauri/target/release/bundle/" >> $GITHUB_ENV
128-
fi
129-
130-
- name: Debug artifact directory
131-
shell: bash
120+
# Zip all files/folders in /bundle/nsis and put in /artifacts/windows-latest/
121+
- name: Zip assets (Windows)
122+
shell: pwsh
123+
if: startsWith(runner.os, 'Windows')
132124
run: |
133-
echo "Contents of ${{ env.artifact_path }}:"
134-
ls -la ${{ env.artifact_path }}
125+
mkdir -p ./artifacts/windows-latest
126+
powershell Compress-Archive -Path src-tauri/target/release/bundle/nsis/* -DestinationPath ./artifacts/windows-latest/windows-latest-artifacts.zip
135127
136-
# Zip all files/folders in env.artifact_path and put in /artifacts/{os}/
137-
- name: Zip assets
128+
# Zip all files/folders in /bundle and put in /artifacts/{os}/
129+
- name: Zip assets (Other)
130+
if: runner.os != 'Windows'
138131
shell: bash
139132
run: |
140133
mkdir -p ./artifacts/${{ matrix.os }}
141-
zip -r ./artifacts/${{ matrix.os }}/${{ matrix.os }}-artifacts.zip ${{ env.artifact_path }}
134+
zip -r ./artifacts/${{ matrix.os }}/${{ matrix.os }}-artifacts.zip src-tauri/target/release/bundle/*
142135
143136
- name: Upload artifact
144137
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)