Skip to content

Commit 48f7716

Browse files
committed
init
0 parents  commit 48f7716

77 files changed

Lines changed: 6391 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/release.ymlβ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
authors:
6+
- dependabot
7+
categories:
8+
- title: Breaking Changes
9+
labels:
10+
- breaking-change
11+
- title: Features
12+
labels:
13+
- enhancement
14+
- feature
15+
- title: Bug Fixes
16+
labels:
17+
- bug
18+
- bugfix
19+
- fix
20+
- title: Improvements
21+
labels:
22+
- improvement
23+
- refactor
24+
- performance
25+
- title: Dependencies
26+
labels:
27+
- dependencies
28+
- title: Other Changes
29+
labels:
30+
- "*"

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: windows-latest
17+
args: ''
18+
- platform: ubuntu-22.04
19+
args: ''
20+
- platform: macos-latest
21+
args: '--target aarch64-apple-darwin'
22+
- platform: macos-latest
23+
args: '--target x86_64-apple-darwin'
24+
25+
runs-on: ${{ matrix.platform }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install system dependencies (Linux)
31+
if: matrix.platform == 'ubuntu-22.04'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y \
35+
libwebkit2gtk-4.1-dev \
36+
libappindicator3-dev \
37+
librsvg2-dev \
38+
patchelf
39+
40+
- name: Install Rust stable
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
44+
45+
- name: Rust cache
46+
uses: swatinem/rust-cache@v2
47+
with:
48+
workspaces: './src-tauri -> target'
49+
50+
- name: Setup Bun
51+
uses: oven-sh/setup-bun@v2
52+
with:
53+
bun-version: latest
54+
55+
- name: Install frontend dependencies
56+
run: bun install
57+
58+
- name: Build with Tauri
59+
uses: tauri-apps/tauri-action@v0
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
args: ${{ matrix.args }}
64+
65+
- name: Upload artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: branchcode-${{ matrix.platform }}${{ matrix.args && format('-{0}', matrix.args) || '' }}
69+
path: |
70+
src-tauri/target/release/bundle/**/*.exe
71+
src-tauri/target/release/bundle/**/*.msi
72+
src-tauri/target/release/bundle/**/*.AppImage
73+
src-tauri/target/release/bundle/**/*.deb
74+
src-tauri/target/release/bundle/**/*.app
75+
src-tauri/target/release/bundle/**/*.dmg
76+
if-no-files-found: warn
77+
retention-days: 30
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: windows-latest
17+
args: ''
18+
- platform: ubuntu-22.04
19+
args: ''
20+
- platform: macos-latest
21+
args: '--target aarch64-apple-darwin'
22+
- platform: macos-latest
23+
args: '--target x86_64-apple-darwin'
24+
25+
runs-on: ${{ matrix.platform }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install system dependencies (Linux)
31+
if: matrix.platform == 'ubuntu-22.04'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y \
35+
libwebkit2gtk-4.1-dev \
36+
libappindicator3-dev \
37+
librsvg2-dev \
38+
patchelf
39+
40+
- name: Install Rust stable
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
44+
45+
- name: Rust cache
46+
uses: swatinem/rust-cache@v2
47+
with:
48+
workspaces: './src-tauri -> target'
49+
50+
- name: Setup Bun
51+
uses: oven-sh/setup-bun@v2
52+
with:
53+
bun-version: latest
54+
55+
- name: Install frontend dependencies
56+
run: bun install
57+
58+
- name: Build with Tauri
59+
uses: tauri-apps/tauri-action@v0
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
tagName: v__VERSION__
64+
releaseName: 'Branchcode v__VERSION__'
65+
releaseBody: 'See the changelog for details.'
66+
releaseDraft: true
67+
prerelease: false
68+
args: ${{ matrix.args }}

β€Ž.gitignoreβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
node_modules/
2+
dist/
3+
build/
4+
coverage/
5+
.DS_Store
6+
*.log
7+
.env*
8+
!.env.example
9+
src-tauri/target/
10+
src-tauri/gen/
11+
12+
# IDE
13+
.vscode/
14+
.idea/
15+
16+
# OS
17+
Thumbs.db
18+
Desktop.ini

β€ŽCI-CD.mdβ€Ž

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# CI/CD Guide
2+
3+
## How it works
4+
5+
Two GitHub Actions workflows handle builds and releases automatically.
6+
7+
### Build workflow (`build.yml`)
8+
9+
- **Trigger**: Every push to `main`
10+
- **What it does**: Builds for Windows, Linux, macOS (both Intel + Apple Silicon)
11+
- **Where**: Artifacts appear on the Actions tab β†’ click a run β†’ scroll down to "Artifacts"
12+
- **Artifacts expire after 30 days**
13+
14+
### Release workflow (`release.yml`)
15+
16+
- **Trigger**: Push a `v*` tag (e.g. `v0.1.0`, `v1.2.3`)
17+
- **What it does**: Builds + creates a **draft** GitHub Release
18+
- **Draft means**: It's not public until YOU review and publish it
19+
20+
## Creating a release
21+
22+
### 1. Bump the version
23+
24+
Edit `src-tauri/tauri.conf.json` and update the version:
25+
26+
```json
27+
{
28+
"version": "0.2.0"
29+
}
30+
```
31+
32+
Also update `package.json` if you want them to match:
33+
34+
```json
35+
{
36+
"version": "0.2.0"
37+
}
38+
```
39+
40+
### 2. Commit and push
41+
42+
```sh
43+
git add .
44+
git commit -m "bump version to 0.2.0"
45+
git push
46+
```
47+
48+
### 3. Tag and push the tag
49+
50+
```sh
51+
git tag v0.2.0
52+
git push origin v0.2.0
53+
```
54+
55+
### 4. Wait for the build
56+
57+
Go to your repo β†’ **Actions** tab β†’ watch the release workflow run.
58+
59+
### 5. Review and publish
60+
61+
Go to **Releases** β†’ you'll see a draft release with auto-generated release notes.
62+
63+
- Review the notes (edit if needed)
64+
- Attach any extra files if you want
65+
- Click **Publish release**
66+
67+
That's it.
68+
69+
## Getting artifacts from main builds
70+
71+
1. Go to your repo β†’ **Actions** tab
72+
2. Click the latest successful "Build" run
73+
3. Scroll down to **Artifacts**
74+
4. Download the platform you need
75+
76+
## Labels for release notes
77+
78+
The `.github/release.yml` file controls how release notes are auto-generated.
79+
Use these labels on PRs to categorize them:
80+
81+
| Label | Category |
82+
|-------|----------|
83+
| `feature`, `enhancement` | Features |
84+
| `bug`, `bugfix`, `fix` | Bug Fixes |
85+
| `breaking-change` | Breaking Changes |
86+
| `improvement`, `refactor`, `performance` | Improvements |
87+
| `dependencies` | Dependencies |
88+
89+
PRs without a label go into "Other Changes".
90+
91+
## Useful commands
92+
93+
```sh
94+
# See current tags
95+
git tag
96+
97+
# Delete a local tag (if you made a mistake)
98+
git tag -d v0.2.0
99+
100+
# Delete a remote tag
101+
git push origin --delete v0.2.0
102+
103+
# Check what version is set
104+
cat src-tauri/tauri.conf.json | grep version
105+
```

β€ŽREADME.mdβ€Ž

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<div align="center">
2+
<img src="src-tauri/icons/128x128.png" alt="Logo" width="128">
3+
<br>
4+
Branchcode
5+
</div>
6+
7+
<p align="center">
8+
AI-native development environment built with Tauri.
9+
<br />
10+
<a href="#about">About</a>
11+
Β·
12+
<a href="#download">Download</a>
13+
Β·
14+
<a href="#developing">Developing</a>
15+
</p>
16+
17+
## About
18+
19+
Branchcode is a desktop application for AI-assisted development. It combines a
20+
Rust backend with a React frontend, packaged as a lightweight native binary via
21+
[Tauri v2](https://v2.tauri.app).
22+
23+
Built with [bun](https://bun.sh) for the frontend and [opencode](https://github.com/anomalyco/opencode) for AI assistance during development.
24+
25+
## Download
26+
27+
Download from [Releases](https://github.com/branchcode/branchcode/releases).
28+
29+
## Developing
30+
31+
### Prerequisites
32+
33+
- [Bun](https://bun.sh)
34+
- [Rust](https://www.rust-lang.org/tools/install) (stable)
35+
36+
### Setup
37+
38+
```sh
39+
bun install
40+
bun run tauri dev
41+
```
42+
43+
### Project Structure
44+
45+
```
46+
branchcode/
47+
β”œβ”€β”€ src/ # React frontend
48+
β”‚ β”œβ”€β”€ components/ # UI components
49+
β”‚ β”œβ”€β”€ lib/ # Tauri API wrappers
50+
β”‚ └── main.tsx # Entry point
51+
β”œβ”€β”€ src-tauri/ # Rust backend
52+
β”‚ β”œβ”€β”€ src/ # Commands and app setup
53+
β”‚ β”œβ”€β”€ Cargo.toml
54+
β”‚ └── tauri.conf.json
55+
└── package.json
56+
```
57+
58+
## License
59+
60+
MIT

0 commit comments

Comments
Β (0)