chore: update Windows and Ubuntu build workflows for improved artifact renaming and organization

This commit is contained in:
PandaDEV 2024-12-22 17:49:08 +10:00
parent 66f229be7e
commit 3824f24be4
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C

View file

@ -163,34 +163,20 @@ jobs:
Write-Output "Found MSI file: $($_.FullName)" Write-Output "Found MSI file: $($_.FullName)"
} }
} }
- name: Rename Windows Artifacts - name: Rename and Publish Windows Artifacts
shell: pwsh
run: | run: |
$version = "${{ needs.prepare.outputs.version }}" mv src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi src-tauri/target/${{ matrix.target }}/release/bundle/msi/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.msi
$arch = "${{ matrix.arch }}" mv src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi.sig src-tauri/target/${{ matrix.target }}/release/bundle/msi/Qopy-${{ needs.prepare.outputs.version }}_${{ matrix.arch }}.msi.sig
# Find MSI files recursively
$msiFiles = Get-ChildItem -Path "src-tauri/target" -Recurse -Filter "*.msi"
foreach ($file in $msiFiles) {
$newName = "Qopy-${version}_${arch}.msi"
Write-Output "Renaming $($file.Name) to $newName"
Rename-Item -Path $file.FullName -NewName $newName
$newPath = Join-Path $file.Directory.FullName $newName
Write-Output "New file path: $newPath"
}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: windows-${{ matrix.arch }} name: windows-${{ matrix.arch }}
path: | path: src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi
src-tauri/target/**/release/bundle/msi/*.msi
src-tauri/target/**/release/bundle/msi/*.msi.sig
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: updater-windows-${{ matrix.arch }} name: updater-windows-${{ matrix.arch }}
path: | path: |
src-tauri/target/${{ matrix.target }}/release/Qopy.msi src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi
src-tauri/target/${{ matrix.target }}/release/Qopy.msi.sig src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi.sig
build-ubuntu: build-ubuntu:
needs: prepare needs: prepare
@ -237,18 +223,18 @@ jobs:
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: ubuntu-deb name: ubuntu-deb
path: src-tauri/target/release/bundle/deb/*.deb path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: ubuntu-appimage name: ubuntu-appimage
path: src-tauri/target/release/bundle/appimage/*.AppImage path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: ubuntu-rpm name: ubuntu-rpm
path: src-tauri/target/release/bundle/rpm/*.rpm path: src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: updater-files-ubuntu name: updater-ubuntu
path: | path: |
src-tauri/target/release/bundle/appimage/*.AppImage src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/appimage/*.AppImage.sig src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage.sig