diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml index 88a83b91a..e1c91647b 100644 --- a/.github/workflows/push-test.yml +++ b/.github/workflows/push-test.yml @@ -10,7 +10,7 @@ jobs: ensure-same-version: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: install dependencies run: | pip install toml @@ -23,7 +23,7 @@ jobs: name: format-check runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: toolchain: stable @@ -40,7 +40,7 @@ jobs: name: clippy-check runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: toolchain: stable @@ -49,7 +49,7 @@ jobs: if: matrix.platform == 'ubuntu-24.04' run: | sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils - name: Create dist folder (Ubuntu only) if: matrix.platform == 'ubuntu-24.04' run: mkdir --parent src-vue/dist @@ -63,14 +63,14 @@ jobs: autogen-ts-bindings-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - name: install dependencies (ubuntu only) run: | sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils - name: Move original TypeScript bindings run: | @@ -100,66 +100,40 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: setup node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 20 + node-version: 24 - uses: dtolnay/rust-toolchain@stable with: toolchain: stable + - name: install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-24.04' run: | sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils + - name: Disable self-updater shell: bash run: | less src-tauri/tauri.conf.json | jq '.plugins.updater.active = false' | jq 'del(.bundle.createUpdaterArtifacts)' > src-tauri/tauri.conf.json.new rm src-tauri/tauri.conf.json mv src-tauri/tauri.conf.json.new src-tauri/tauri.conf.json + - uses: Swatinem/rust-cache@v2 # Cache Rust build artifacts with: workspaces: | src-tauri - - name: install app dependencies and build it - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - run: | - npm clean-install - cd src-vue && npm clean-install && cd .. - npm run tauri build - - uses: tauri-apps/tauri-action@v0 + + - name: Install frontend dependencies + run: npm install && cd src-vue && npm install && cd .. + + - name: Compile and upload app + uses: tauri-apps/tauri-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - - name: Upload Linux artifact - if: matrix.platform == 'ubuntu-24.04' - uses: actions/upload-artifact@v4 - with: - name: linux-artifacts - path: | - src-tauri/target/release/bundle/appimage/* - - name: Upload Linux AppImage - if: matrix.platform == 'ubuntu-24.04' - uses: actions/upload-artifact@v4 - with: - name: linux-appimage - path: | - src-tauri/target/release/bundle/appimage/*.AppImage - - name: Upload Windows artifact - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v4 - with: - name: windows-artifacts - path: | - src-tauri/target/release/bundle/msi/* - src-tauri/target/release/app.pdb - - name: Additionally upload Windows installer separately - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v4 with: - name: windows-msi - path: | - src-tauri/target/release/bundle/msi/*.msi + uploadWorkflowArtifacts: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2dbac9d0..b24ce0ddc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: ensure-same-version: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: install dependencies run: | pip install toml @@ -29,88 +29,38 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: setup node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: 20 + node-version: 24 - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: toolchain: stable - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-24.04' - run: | - sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev + - uses: Swatinem/rust-cache@v2 # Cache Rust build artifacts with: workspaces: | src-tauri - - name: install app dependencies and build it - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - run: | - npm clean-install - cd src-vue && npm clean-install && cd .. - npm run tauri build - - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - - name: upload build artifact (windows) - if: matrix.platform == 'windows-latest' - uses: actions/upload-artifact@v4 - with: - name: windows-artifacts - path: | - src-tauri/target/release/bundle/msi/*msi* - src-tauri/target/release/flightcore.pdb - - name: upload build artifact (linux) + + - name: Install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-24.04' - uses: actions/upload-artifact@v4 - with: - name: linux-artifacts - path: | - src-tauri/target/release/bundle/appimage/*AppImage* - - name: Install sentry-cli (Windows only) - if: matrix.platform == 'windows-latest' - run: | - curl --location --output sentry-cli.exe "https://release-registry.services.sentry.io/apps/sentry-cli/latest?response=download&arch=x86_64&platform=Windows&package=sentry-cli" - - name: Run sentry-cli to upload pdb (Windows only) - if: matrix.platform == 'windows-latest' - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: northstar-kv - SENTRY_PROJECT: flightcore run: | - ./sentry-cli.exe upload-dif --wait src-tauri/target/release/flightcore.pdb - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - files: | - src-tauri/target/release/bundle/appimage/*AppImage* - src-tauri/target/release/bundle/msi/*msi* + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils - create-release-file: - needs: build - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - - name: Create release file - run: | - ls -al - ls -al linux-artifacts/ - ls -al windows-artifacts/ - ls -al windows-artifacts/bundle/ - ls -al windows-artifacts/bundle/msi/ - python3 scripts/create-release-file.py --version ${{github.ref_name}} + - name: Install frontend dependencies + run: npm install && cd src-vue && npm install && cd .. - - name: upload release file - uses: softprops/action-gh-release@v1 + - name: Compile and upload app + uses: tauri-apps/tauri-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} with: - draft: true - files: | - latest-release.json + tagName: v__VERSION__ + releaseName: 'v__VERSION__' + releaseDraft: true + prerelease: true + uploadUpdaterJson: true diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index cff6df58a..1ab49b734 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -584,7 +584,7 @@ fn delete_older_versions( // Get folders in packages dir let paths = match std::fs::read_dir(&packages_folder) { Ok(paths) => paths, - Err(_err) => return Err(format!("Failed to read directory {}", &packages_folder)), + Err(_err) => return Err(format!("Failed to read directory {}", packages_folder)), }; let mut directories: Vec = Vec::new(); diff --git a/src-tauri/src/northstar/mod.rs b/src-tauri/src/northstar/mod.rs index 9953d742e..1af9bd464 100644 --- a/src-tauri/src/northstar/mod.rs +++ b/src-tauri/src/northstar/mod.rs @@ -30,7 +30,7 @@ pub async fn get_available_northstar_versions( .unwrap(); let mut releases: Vec = vec![]; - for (_version_string, nsmod_version_obj) in nsmod.versions.iter() { + for nsmod_version_obj in nsmod.versions.values() { let current_elem = NorthstarThunderstoreRelease { package: nsmod_version_obj.name.clone(), version: nsmod_version_obj.version.clone(),