Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
88877ec
Add initial Tauri v2 support
haslinghuis Mar 11, 2025
48c2b5a
Add native tauri check
haslinghuis Mar 12, 2025
42aeeec
Add Tauri v2 shell:allow-open capability
haslinghuis Sep 5, 2025
acd61f4
Update
haslinghuis Oct 23, 2025
84ede3c
Add DockerFile (needs testing)
haslinghuis Oct 23, 2025
4902890
Update edition
haslinghuis Oct 23, 2025
f151b51
Update DOCKER.MD
haslinghuis Oct 24, 2025
0054921
Fix app security capabilities
haslinghuis Oct 24, 2025
a3306b8
Fix outdated versions
haslinghuis Oct 24, 2025
03cac08
Fix shell open
haslinghuis Oct 24, 2025
c92fa42
Add android commands
haslinghuis Oct 24, 2025
4853c58
Use yarn for docker
haslinghuis Oct 24, 2025
d77ffcd
Use cargo
haslinghuis Oct 24, 2025
7522fcd
Fix yarn tauri:android:dev
haslinghuis Oct 24, 2025
35c46eb
isTauri does not work with Android
haslinghuis Oct 24, 2025
a101a60
Update path for ADB
haslinghuis Oct 24, 2025
7f512d1
Use run-script-os
haslinghuis Oct 24, 2025
387e73e
Fix HMR on android
haslinghuis Oct 24, 2025
2405e8c
Remove redundant alias
haslinghuis Oct 24, 2025
f9d0229
Avoid device offline races
haslinghuis Oct 24, 2025
e5cbca7
👾
haslinghuis Oct 24, 2025
9b4b089
add equivalent boot completion check to Windows version
haslinghuis Oct 24, 2025
033ed2d
Fix sonar
haslinghuis Oct 24, 2025
f11154a
Nitpicks
haslinghuis Oct 24, 2025
456d03b
Added support for tauriserial
haslinghuis Oct 25, 2025
0fa4034
Added support for tauriserial II
haslinghuis Oct 25, 2025
a34720e
Update DOCKER.md
haslinghuis Oct 25, 2025
7a0c83a
Update
haslinghuis Oct 25, 2025
b202a7a
Fix broken pipe, reconnect, unplug
haslinghuis Oct 25, 2025
8f425c3
Fix some sonar issues
haslinghuis Oct 25, 2025
3fda9fe
Coderabbit refactoring
haslinghuis Oct 25, 2025
78b8c8e
Use function not object
haslinghuis Oct 25, 2025
6b83cb1
Fix race condition
haslinghuis Oct 25, 2025
7d8e682
Remove deadcode after refactoring
haslinghuis Oct 25, 2025
3203205
Fix some more sonar issues but not all
haslinghuis Oct 25, 2025
794e516
cargo update
haslinghuis Oct 25, 2025
219fb67
ci: simplify to node-only, add workflow_dispatch test wrapper
haslinghuis Oct 25, 2025
73ebf07
release: add Tauri desktop builds (dmg/nsis/deb/appimage) and optiona…
haslinghuis Oct 25, 2025
8cc5564
release: always build Android APK; setup Android SDK and cache Gradle…
haslinghuis Oct 25, 2025
2b37847
ci: run on pull_request and push; upload web-dist artifact to PR; gua…
haslinghuis Oct 25, 2025
b2ec264
ci: add Tauri Linux preview job to build and upload .deb/.AppImage on…
haslinghuis Oct 25, 2025
65ea802
ci: fix Tauri Linux preview by installing required Linux deps (webkit…
haslinghuis Oct 25, 2025
beaa32d
CI: fix Tauri Linux preview by building web assets and set correct CW…
haslinghuis Oct 25, 2025
09c745e
Fix tauri.conf.json schema error: remove unsupported *Cwd keys; run w…
haslinghuis Oct 25, 2025
1e47dde
CI: run Tauri before* commands at repo root (remove `cd ..`) to fix p…
haslinghuis Oct 25, 2025
6001931
Rust
haslinghuis Oct 25, 2025
f29dc9e
CI+Tauri: point frontendDist to ../src/dist and upload correct web ar…
haslinghuis Oct 25, 2025
48c5254
CI: fix Tauri action invocation (use `yarn tauri` so action appends `…
haslinghuis Oct 25, 2025
f25d3d2
CI(Linux): install pkg-config, libudev-dev, and libssl-dev to satisfy…
haslinghuis Oct 25, 2025
b3f3259
Publish
haslinghuis Oct 26, 2025
6873847
Remove fallback
haslinghuis Oct 26, 2025
1647074
Fix artifact-links workflow: trigger on "CI" workflow instead of non-…
haslinghuis Oct 26, 2025
b7cf233
Fix artifact-links: only run when CI was triggered by pull_request (s…
haslinghuis Oct 26, 2025
cbbdcf2
Add permissions to artifact-links workflow (pull-requests: write, act…
haslinghuis Oct 26, 2025
56f2783
Rewrite artifact-links workflow with github-script for better reliabi…
haslinghuis Oct 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 51 additions & 9 deletions .github/workflows/artifact-links.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,62 @@
name: Artifact links comments creator
on:
workflow_run:
workflows: ["PR"]
workflows: ["CI"]
types: [completed]

jobs:
artifacts-url-comments:
name: Add artifact links to PR and issues
runs-on: ubuntu-latest
# Only run if the CI workflow was triggered by a pull_request and succeeded
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write
actions: read
steps:
- name: Add artifact links to PR and issues
uses: tonyhallett/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Download artifact metadata'
uses: actions/github-script@v7
id: artifacts
with:
script: |
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});

let links = [];
for (const artifact of artifacts.data.artifacts) {
const url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.payload.workflow_run.id}/artifacts/${artifact.id}`;
links.push(`- [${artifact.name}](${url}) (${(artifact.size_in_bytes / 1024 / 1024).toFixed(2)} MB)`);
}

core.setOutput('artifact_links', links.join('\n'));
core.setOutput('has_artifacts', links.length > 0);

- name: 'Comment on PR'
if: steps.artifacts.outputs.has_artifacts == 'true'
uses: actions/github-script@v7
with:
prefix: "Do you want to test this code? Here you have an automated build:"
suffix: "WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!"
format: name
addTo: pull
script: |
const prNumber = context.payload.workflow_run.pull_requests[0].number;
const artifactLinks = process.env.ARTIFACT_LINKS;

const body = `## 🚀 Build Artifacts Ready!

Do you want to test this code? Here you have automated builds:

${artifactLinks}

⚠️ **WARNING:** These are preview builds and may be unstable. They could result in corrupted configurations or data loss. Use only for testing!`;

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: body
});
env:
ARTIFACT_LINKS: ${{ steps.artifacts.outputs.artifact_links }}
17 changes: 17 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI Test

on:
workflow_dispatch:
inputs:
run_docker_build:
description: "Also try a Docker build if a Dockerfile exists"
required: false
default: "false"
type: choice
options: ["false", "true"]

jobs:
call-ci:
uses: ./.github/workflows/ci.yml
with:
run_docker_build: ${{ github.event.inputs.run_docker_build == 'true' }}
196 changes: 116 additions & 80 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,111 +1,147 @@
# Builds Betaflight Configurator on Windows, Android, Linux and macOS platforms.
#
# After building, artifacts are released to a separate repository.

name: CI

# Run on PRs to show artifacts, and keep callable for reuse.
on:
pull_request:
push:
branches: [ tauri ]
workflow_call:
inputs:
debug_build:
description: 'Specifies if it is a debug build or a release build'
default: true
run_docker_build:
description: 'Also try a Docker build if a Dockerfile exists'
required: false
default: false
type: boolean

jobs:
test:
name: Test
node-ci:
name: Lint, test, and build (Node)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules/
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Checkout
uses: actions/checkout@v5

- name: Install Node.js
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- run: yarn install --immutable --immutable-cache --check-cache

- name: Run unit tests
run: yarn test

build:
name: Build (${{ matrix.name }})
needs: test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Android
os: ubuntu-latest
releaseArgs: --android

- name: Linux
os: ubuntu-latest
releaseArgs: --linux64

- name: macOS
os: macos-11
releaseArgs: --osx64

- name: Windows
os: windows-2022
releaseArgs: --win64
steps:
- uses: actions/checkout@v5
- name: Install dependencies (Yarn classic)
run: yarn install --frozen-lockfile

- name: Cache NW.js
uses: actions/cache@v4
with:
path: cache/
key: nwjs-${{ inputs.debug_build && 'debug' || 'release' }}-${{ runner.os }}
- name: Lint
run: yarn lint

- name: Unit tests
run: yarn test --run

- name: Cache node_modules
uses: actions/cache@v4
- name: Build web (Vite)
run: yarn build

- name: Upload web dist
uses: actions/upload-artifact@v4
with:
path: node_modules/
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
name: web-dist
path: src/dist/
if-no-files-found: warn
retention-days: 14

tauri-linux-preview:
name: Tauri Linux preview (deb/appimage)
runs-on: ubuntu-latest
needs: node-ci
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install Node.js
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install macos dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install Linux deps (Tauri)
run: |
sudo -H pip install setuptools packaging
sudo npm install -g [email protected] node-gyp@10 macos-alias
yarn --network-timeout 1000000
if: ${{ matrix.name == 'macOs' }}

- name: Install Java JDK 8
uses: actions/setup-java@v5
if: ${{ matrix.name == 'Android' }}
sudo apt-get update
sudo apt-get install -y \
pkg-config \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libudev-dev \
libssl-dev \
patchelf

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Build web assets (Vite)
run: yarn build

- name: Build Tauri (Linux)
uses: tauri-apps/tauri-action@v0
with:
distribution: temurin
java-version: '8'

- run: yarn install --immutable --immutable-cache --check-cache

- run: yarn version --no-git-tag-version --new-version ${{ github.ref_name }}
if: ${{ !inputs.debug_build }}
# Use the Tauri CLI directly; the action appends 'build' automatically.
tauriScript: yarn tauri
# Disable updater.json handling and any release uploads for PR previews.
includeUpdaterJson: false

- run: yarn gulp release ${{ matrix.releaseArgs }}
if: ${{ !inputs.debug_build && matrix.name != 'Android' }}
- name: Inspect Tauri bundle output
if: always()
run: |
echo "Listing bundle directory (if present):"
ls -la src-tauri/target/release || true
ls -la src-tauri/target/release/bundle || true
find src-tauri/target/release/bundle -maxdepth 3 -type f -print || true

- run: yarn gulp debug-release ${{ matrix.releaseArgs }}
if: ${{ inputs.debug_build || matrix.name == 'Android' }}
- name: Upload Linux installers
uses: actions/upload-artifact@v4
with:
name: linux-installers
path: |
src-tauri/target/release/bundle/**/*.deb
src-tauri/target/release/bundle/**/*.AppImage
if-no-files-found: warn
retention-days: 14

docker-build:
name: Docker build (optional)
runs-on: ubuntu-latest
needs: node-ci
# Only run when called as a reusable workflow AND the caller enabled it
if: ${{ github.event_name == 'workflow_call' && inputs.run_docker_build == true }}
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Publish build artifacts
- name: Check for Dockerfile
id: chk
shell: bash
run: |
if [[ -f Dockerfile ]]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
fi

- name: Build container image
if: ${{ steps.chk.outputs.present == 'true' }}
run: |
docker build -t betaflight-configurator:ci .
- name: Export container (tar)
if: ${{ steps.chk.outputs.present == 'true' }}
run: |
docker save betaflight-configurator:ci -o image.tar
- name: Upload image
uses: actions/upload-artifact@v4
if: ${{ steps.chk.outputs.present == 'true' }}
with:
name: Betaflight-Configurator${{ inputs.debug_build == 'true' && '-Debug' || '' }}-${{ matrix.name }}
path: release/
retention-days: 90
name: docker-image
path: image.tar
retention-days: 7
Loading