Skip to content
Merged
66 changes: 20 additions & 46 deletions .github/workflows/push-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand Down Expand Up @@ -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
92 changes: 21 additions & 71 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion src-tauri/src/mod_management/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf> = Vec::new();
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/northstar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub async fn get_available_northstar_versions(
.unwrap();

let mut releases: Vec<NorthstarThunderstoreReleaseWrapper> = 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(),
Expand Down