Store update platform to artifact

This commit is contained in:
Thorsten Sommer 2024-06-15 22:55:51 +02:00
parent 0e85118173
commit 75c4be3b05
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -15,30 +15,35 @@ jobs:
include: include:
- platform: 'macos-latest' # for ARM-based macOS (M1 and above) - platform: 'macos-latest' # for ARM-based macOS (M1 and above)
rust_target: 'aarch64-apple-darwin' rust_target: 'aarch64-apple-darwin'
update_platform: 'darwin-aarch64'
dotnet_runtime: 'osx-arm64' dotnet_runtime: 'osx-arm64'
dotnet_name_postfix: '-aarch64-apple-darwin' dotnet_name_postfix: '-aarch64-apple-darwin'
tauri_bundle: 'dmg updater' tauri_bundle: 'dmg updater'
- platform: 'macos-latest' # for Intel-based macOS - platform: 'macos-latest' # for Intel-based macOS
rust_target: 'x86_64-apple-darwin' rust_target: 'x86_64-apple-darwin'
update_platform: 'darwin-x86_64'
dotnet_runtime: 'osx-x64' dotnet_runtime: 'osx-x64'
dotnet_name_postfix: '-x86_64-apple-darwin' dotnet_name_postfix: '-x86_64-apple-darwin'
tauri_bundle: 'dmg updater' tauri_bundle: 'dmg updater'
- platform: 'ubuntu-22.04' # for x86-based linux - platform: 'ubuntu-22.04' # for x86-based linux
rust_target: 'x86_64-unknown-linux-gnu' rust_target: 'x86_64-unknown-linux-gnu'
update_platform: 'linux-x86_64'
dotnet_runtime: 'linux-x64' dotnet_runtime: 'linux-x64'
dotnet_name_postfix: '-x86_64-unknown-linux-gnu' dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
tauri_bundle: 'appimage deb updater' tauri_bundle: 'appimage deb updater'
- platform: 'windows-latest' # for x86-based windows - platform: 'windows-latest' # for x86-based windows
rust_target: 'x86_64-pc-windows-msvc' rust_target: 'x86_64-pc-windows-msvc'
update_platform: 'windows-x86_64'
dotnet_runtime: 'win-x64' dotnet_runtime: 'win-x64'
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe' dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
tauri_bundle: 'msi nsis updater' tauri_bundle: 'msi nsis updater'
- platform: 'windows-latest' # for ARM-based windows - platform: 'windows-latest' # for ARM-based windows
rust_target: 'aarch64-pc-windows-msvc' rust_target: 'aarch64-pc-windows-msvc'
update_platform: 'windows-aarch64'
dotnet_runtime: 'win-arm64' dotnet_runtime: 'win-arm64'
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe' dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
tauri_bundle: 'nsis updater' tauri_bundle: 'nsis updater'
@ -50,6 +55,14 @@ jobs:
with: with:
lfs: false lfs: false
- name: Store update platform to .updates directory (Unix)
if: matrix.platform != 'windows-latest'
run: echo ${{ matrix.update_platform }} > .updates/platform
- name: Store update platform to .updates directory (Windows)
if: matrix.platform == 'windows-latest'
run: Write-Output "${{ matrix.update_platform }}" | Out-File -FilePath ".updates/platform" -Encoding utf8
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
@ -173,6 +186,7 @@ jobs:
path: | path: |
runtime/target/${{ matrix.rust_target }}/release/bundle/dmg/MindWork AI Studio_*.dmg runtime/target/${{ matrix.rust_target }}/release/bundle/dmg/MindWork AI Studio_*.dmg
runtime/target/${{ matrix.rust_target }}/release/bundle/macos/MindWork AI Studio.app.tar.gz* runtime/target/${{ matrix.rust_target }}/release/bundle/macos/MindWork AI Studio.app.tar.gz*
.updates/platform
if-no-files-found: error if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}
@ -184,6 +198,7 @@ jobs:
path: | path: |
runtime/target/${{ matrix.rust_target }}/release/bundle/msi/MindWork AI Studio_*.msi runtime/target/${{ matrix.rust_target }}/release/bundle/msi/MindWork AI Studio_*.msi
runtime/target/${{ matrix.rust_target }}/release/bundle/msi/MindWork AI Studio*msi.zip* runtime/target/${{ matrix.rust_target }}/release/bundle/msi/MindWork AI Studio*msi.zip*
.updates/platform
if-no-files-found: error if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}
@ -195,6 +210,7 @@ jobs:
path: | path: |
runtime/target/${{ matrix.rust_target }}/release/bundle/nsis/MindWork AI Studio_*.exe runtime/target/${{ matrix.rust_target }}/release/bundle/nsis/MindWork AI Studio_*.exe
runtime/target/${{ matrix.rust_target }}/release/bundle/nsis/MindWork AI Studio*nsis.zip* runtime/target/${{ matrix.rust_target }}/release/bundle/nsis/MindWork AI Studio*nsis.zip*
.updates/platform
if-no-files-found: error if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}
@ -203,7 +219,9 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: MindWork AI Studio (Linux - deb ${{ matrix.dotnet_runtime }}) name: MindWork AI Studio (Linux - deb ${{ matrix.dotnet_runtime }})
path: "runtime/target/${{ matrix.rust_target }}/release/bundle/deb/mind-work-ai-studio_*.deb" path: |
runtime/target/${{ matrix.rust_target }}/release/bundle/deb/mind-work-ai-studio_*.deb
.updates/platform
if-no-files-found: error if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}
@ -215,6 +233,7 @@ jobs:
path: | path: |
runtime/target/${{ matrix.rust_target }}/release/bundle/appimage/mind-work-ai-studio_*.AppImage runtime/target/${{ matrix.rust_target }}/release/bundle/appimage/mind-work-ai-studio_*.AppImage
runtime/target/${{ matrix.rust_target }}/release/bundle/appimage/mind-work-ai-studio*AppImage.tar.gz* runtime/target/${{ matrix.rust_target }}/release/bundle/appimage/mind-work-ai-studio*AppImage.tar.gz*
.updates/platform
if-no-files-found: error if-no-files-found: error
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}
@ -229,6 +248,9 @@ jobs:
with: with:
lfs: false lfs: false
- name: Store update platform to .updates directory
run: echo "linux-aarch64" > .updates/platform
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v4
with: with:
@ -356,7 +378,9 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: MindWork AI Studio (Linux - deb linux-arm64) name: MindWork AI Studio (Linux - deb linux-arm64)
path: "result/target/aarch64-unknown-linux-gnu/release/bundle/deb/mind-work-ai-studio_*.deb" path: |
result/target/aarch64-unknown-linux-gnu/release/bundle/deb/mind-work-ai-studio_*.deb
.updates/platform
if-no-files-found: warn if-no-files-found: warn
retention-days: ${{ env.RETENTION_DAYS }} retention-days: ${{ env.RETENTION_DAYS }}