Skip to content

Commit 36a474c

Browse files
Copilotlstein
andauthored
Fix artifact upload: create archives before uploading to GitHub Release (#215)
* Fix artifact upload: create archives before uploading to GitHub Release Agent-Logs-Url: https://github.com/lstein/PhotoMapAI/sessions/ba4958bf-9b78-494a-830d-f4da4a98bba0 Co-authored-by: lstein <111189+lstein@users.noreply.github.com> * Use zip archives for all platforms (Linux/macOS/Windows) for consistency Agent-Logs-Url: https://github.com/lstein/PhotoMapAI/sessions/6fcd4359-539f-483d-a434-b24f39599d47 Co-authored-by: lstein <111189+lstein@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
1 parent b8e26ac commit 36a474c

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/deploy-pyinstaller.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,19 @@ jobs:
1616
build_script: ./INSTALL/pyinstaller/make_pyinstaller_image.sh
1717
executable_ext: ""
1818
macos_app_flag: ""
19+
archive_ext: ".zip"
1920
- os: macos-latest
2021
platform: macos-x64
2122
build_script: ./INSTALL/pyinstaller/make_pyinstaller_image.sh
2223
executable_ext: ""
2324
macos_app_flag: "--macos-app"
25+
archive_ext: ".zip"
2426
- os: windows-latest
2527
platform: windows-x64
2628
build_script: ./INSTALL/pyinstaller/make_pyinstaller_image.ps1
2729
executable_ext: ".exe"
2830
macos_app_flag: ""
31+
archive_ext: ".zip"
2932
exclude:
3033
- os: macos-latest
3134
torch_variant: cu129
@@ -151,6 +154,27 @@ jobs:
151154
Get-ChildItem *
152155
shell: pwsh
153156

157+
- name: Create archive (Linux/macOS)
158+
if: runner.os != 'Windows'
159+
run: |
160+
VERSION="${{ steps.get_version_unix.outputs.version }}"
161+
ARCHIVE_NAME="photomap-${{ matrix.platform }}-${{ matrix.torch_variant }}-v$VERSION"
162+
cd dist
163+
if [ -d "${ARCHIVE_NAME}.app" ]; then
164+
zip -r "${ARCHIVE_NAME}.zip" "${ARCHIVE_NAME}.app"
165+
else
166+
zip -r "${ARCHIVE_NAME}.zip" "${ARCHIVE_NAME}"
167+
fi
168+
shell: bash
169+
170+
- name: Create archive (Windows)
171+
if: runner.os == 'Windows'
172+
run: |
173+
$version = "${{ steps.get_version_win.outputs.version }}"
174+
$archiveName = "photomap-${{ matrix.platform }}-${{ matrix.torch_variant }}-v$version"
175+
Compress-Archive -Path "dist\$archiveName" -DestinationPath "dist\$archiveName.zip" -Force
176+
shell: pwsh
177+
154178
- name: Debug - List dist contents
155179
run: ls -la dist/
156180
shell: bash
@@ -165,5 +189,5 @@ jobs:
165189
uses: actions/upload-artifact@v4
166190
with:
167191
name: photomap-${{ matrix.platform }}-${{ matrix.torch_variant }}-v${{ steps.get_version_unix.outputs.version || steps.get_version_win.outputs.version }}
168-
path: dist/photomap-${{ matrix.platform }}-${{ matrix.torch_variant }}-v${{ steps.get_version_unix.outputs.version || steps.get_version_win.outputs.version }}*
192+
path: dist/photomap-${{ matrix.platform }}-${{ matrix.torch_variant }}-v${{ steps.get_version_unix.outputs.version || steps.get_version_win.outputs.version }}${{ matrix.archive_ext }}
169193
retention-days: 30

0 commit comments

Comments
 (0)