Surface the commit a build came from as a placeholder version identifier, until a proper version scheme exists. - rust/lib: build.rs captures the commit hash at compile time (CI env override, else jj/git, else "unknown") and exposes it via a new version module plus a build_info() uniffi export. - CLI: new 'about' command printing version and full commit hash. - GUI: About card in settings, fed by a BuildInfo Slint global. - Android: About section in settings, with the commit selectable/copyable. - CI: pass GITEA_SHA into the APK build step so the embedded hash is deterministic. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build Debug APK
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
inputs:
|
|
skip_build:
|
|
description: 'Skip APK build (reuse existing artifact)'
|
|
required: false
|
|
default: 'false'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: nix-host
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build APK
|
|
if: ${{ gitea.event.inputs.skip_build != 'true' }}
|
|
env:
|
|
# Embedded into the build by rust/lib/build.rs (the About screen /
|
|
# `syn about` command) so the APK reports the commit it came from.
|
|
GITEA_SHA: ${{ gitea.sha }}
|
|
run: nix develop --command build-apk-ci
|
|
|
|
- name: Verify APK exists
|
|
run: |
|
|
echo "PWD: $PWD"
|
|
find . -name "*.apk" -type f 2>/dev/null || echo "No APK files found anywhere"
|
|
|
|
- name: Create release
|
|
env:
|
|
GITEA_SHA: ${{ gitea.sha }}
|
|
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
|
GITEA_REPO: ${{ gitea.repository }}
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
run: nix develop --command create-release-ci
|