Skip to content

Commit e275840

Browse files
authored
Merge pull request #13342 from gitbutlerapp/package-lite
ci: add minimal workflow for building gitbutler-lite
2 parents c8113bf + 94d3d6c commit e275840

6 files changed

Lines changed: 92 additions & 5 deletions

File tree

.github/workflows/lite.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Lite"
2+
on:
3+
schedule:
4+
- cron: "0 2 * * *"
5+
workflow_dispatch: {}
6+
7+
env:
8+
RUST_BACKTRACE: full
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions: {}
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.platform }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- platform: macos-15 # [macOs, ARM64]
24+
- platform: ubuntu-22.04 # [linux, x64]
25+
- platform: windows-latest # [windows, x64]
26+
env:
27+
CARGO_TERM_COLOR: always
28+
CARGO_PROFILE_RELEASE_LTO: fat
29+
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
30+
CARGO_PROFILE_RELEASE_OPT_LEVEL: s
31+
steps:
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
35+
- name: Install system dependencies
36+
if: runner.os == 'Linux'
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get -y install pkg-config libxss-dev libdbus-1-dev
40+
- uses: ./.github/actions/init-env-node
41+
- name: Set version
42+
working-directory: apps/lite
43+
run: pnpm version "0.0.${{ github.run_number }}" --no-git-tag-version
44+
- name: Build
45+
env:
46+
CHANNEL: nightly
47+
VERSION: "0.0.${{ github.run_number }}"
48+
run: |
49+
pnpm --filter @gitbutler/but-sdk build
50+
pnpm --filter @gitbutler/lite bundle
51+
52+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
53+
name: Upload artifacts
54+
with:
55+
name: gitbutler-lite-${{ github.run_number }}-${{ matrix.platform }}
56+
path: apps/lite/release/
57+
if-no-files-found: error
58+
retention-days: 7

apps/lite/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
release/

apps/lite/package.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "@gitbutler/lite",
3+
"productName": "gitbutler-lite",
4+
"homepage": "https://gitbutler.com",
35
"private": true,
46
"version": "0.0.1",
57
"type": "module",
@@ -32,6 +34,31 @@
3234
],
3335
"mac": {
3436
"target": "dmg"
37+
},
38+
"linux": {
39+
"target": [
40+
"deb",
41+
"appimage"
42+
],
43+
"maintainer": "GitButler <gitbutler@gitbutler.com>"
44+
},
45+
"win": {
46+
"target": [
47+
"portable"
48+
]
49+
},
50+
"deb": {
51+
"packageName": "gitbutler-lite",
52+
"artifactName": "${productName}-${version}-${arch}.${ext}",
53+
"depends": [
54+
"libnotify4",
55+
"libxtst6",
56+
"libnss3",
57+
"libxss1"
58+
]
59+
},
60+
"appImage": {
61+
"artifactName": "${productName}-${version}-${arch}.${ext}"
3562
}
3663
},
3764
"dependencies": {
@@ -46,7 +73,6 @@
4673
"@tanstack/react-query-devtools": "^5.91.3",
4774
"@tanstack/react-router": "^1.167.4",
4875
"effect": "^3.20.0",
49-
"electron": "^41.1.0",
5076
"electron-devtools-installer": "^4.0.0",
5177
"react": "^19.2.4",
5278
"react-dom": "^19.2.4",
@@ -61,6 +87,7 @@
6187
"@typescript/native-preview": "7.0.0-dev.20260311.1",
6288
"@vitejs/plugin-react": "^5.2.0",
6389
"babel-plugin-react-compiler": "^1.0.0",
90+
"electron": "^41.1.0",
6491
"concurrently": "^9.2.1",
6592
"cross-env": "^10.1.0",
6693
"electron-builder": "^26.8.1",

apps/lite/ui/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default defineConfig({
1515
},
1616
}),
1717
],
18+
base: "./",
1819
build: {
1920
outDir: "../dist/ui",
2021
emptyOutDir: true,

knip.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"project": ["electron/src/**!", "ui/src/**!"],
2222
"includeEntryExports": true,
23-
"ignoreDependencies": ["@tanstack/eslint-plugin-query"],
23+
"ignoreDependencies": ["@tanstack/eslint-plugin-query", "electron"],
2424
},
2525
},
2626
}

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)