Skip to content

Commit 0e7409e

Browse files
committed
feat: initial release (v1.0.0)
0 parents  commit 0e7409e

Some content is hidden

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

73 files changed

+22186
-0
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, release]
6+
pull_request:
7+
branches: [main, release]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
ci:
15+
name: CI
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Install Rust 1.93 stable
23+
uses: dtolnay/rust-toolchain@stable
24+
with:
25+
toolchain: "1.93"
26+
components: rustfmt, clippy
27+
28+
- name: Cache cargo registry
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cargo/registry
33+
~/.cargo/git
34+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-cargo-registry-
37+
38+
- name: Cache cargo build
39+
uses: actions/cache@v4
40+
with:
41+
path: target
42+
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Cargo.toml') }}
43+
restore-keys: |
44+
${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}-
45+
${{ runner.os }}-cargo-target-
46+
47+
- name: Check formatting
48+
run: cargo fmt --check
49+
50+
- name: Clippy
51+
run: cargo clippy -- -D warnings
52+
53+
- name: Run tests
54+
run: cargo test

.github/workflows/release.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [release]
6+
7+
permissions:
8+
contents: write
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
changelog:
15+
name: Generate changelog
16+
runs-on: ubuntu-latest
17+
outputs:
18+
changelog: ${{ steps.cliff.outputs.content }}
19+
version: ${{ steps.version.outputs.version }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Get version from Cargo.toml
27+
id: version
28+
run: |
29+
version=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
30+
echo "version=$version" >> "$GITHUB_OUTPUT"
31+
32+
- name: Generate changelog
33+
id: cliff
34+
uses: orhun/git-cliff-action@v4
35+
with:
36+
args: --latest --strip header
37+
env:
38+
GITHUB_REPO: ${{ github.repository }}
39+
40+
build:
41+
name: Build (${{ matrix.target }})
42+
runs-on: ${{ matrix.runner }}
43+
needs: [changelog]
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
include:
48+
- target: x86_64-unknown-linux-gnu
49+
runner: ubuntu-latest
50+
cross: false
51+
- target: aarch64-unknown-linux-gnu
52+
runner: ubuntu-latest
53+
cross: true
54+
- target: x86_64-apple-darwin
55+
runner: macos-latest
56+
cross: false
57+
- target: aarch64-apple-darwin
58+
runner: macos-latest
59+
cross: false
60+
- target: x86_64-pc-windows-msvc
61+
runner: windows-latest
62+
cross: false
63+
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
68+
- name: Install Rust 1.93 stable
69+
uses: dtolnay/rust-toolchain@stable
70+
with:
71+
toolchain: "1.93"
72+
targets: ${{ matrix.target }}
73+
74+
- name: Cache cargo registry
75+
uses: actions/cache@v4
76+
with:
77+
path: |
78+
~/.cargo/registry
79+
~/.cargo/git
80+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
81+
restore-keys: |
82+
${{ runner.os }}-${{ matrix.target }}-cargo-registry-
83+
84+
- name: Install cross
85+
if: matrix.cross
86+
run: cargo install cross --locked
87+
88+
- name: Build release binary (cross)
89+
if: matrix.cross
90+
run: cross build --release --target ${{ matrix.target }}
91+
92+
- name: Build release binary (native)
93+
if: "!matrix.cross"
94+
run: cargo build --release --target ${{ matrix.target }}
95+
96+
- name: Package binary (Unix)
97+
if: runner.os != 'Windows'
98+
run: |
99+
cd target/${{ matrix.target }}/release
100+
tar czf ../../../agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.tar.gz agcp
101+
cd ../../..
102+
103+
- name: Package binary (Windows)
104+
if: runner.os == 'Windows'
105+
shell: pwsh
106+
run: |
107+
Compress-Archive -Path "target/${{ matrix.target }}/release/agcp.exe" -DestinationPath "agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.zip"
108+
109+
- name: Upload artifact (Unix)
110+
if: runner.os != 'Windows'
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.tar.gz
114+
path: agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.tar.gz
115+
if-no-files-found: error
116+
117+
- name: Upload artifact (Windows)
118+
if: runner.os == 'Windows'
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.zip
122+
path: agcp-v${{ needs.changelog.outputs.version }}-${{ matrix.target }}.zip
123+
if-no-files-found: error
124+
125+
release:
126+
name: Create GitHub release
127+
runs-on: ubuntu-latest
128+
needs: [changelog, build]
129+
steps:
130+
- name: Checkout
131+
uses: actions/checkout@v4
132+
133+
- name: Download all artifacts
134+
uses: actions/download-artifact@v4
135+
with:
136+
path: artifacts
137+
merge-multiple: true
138+
139+
- name: List artifacts
140+
run: ls -lR artifacts/
141+
142+
- name: Create draft release
143+
uses: softprops/action-gh-release@v2
144+
with:
145+
tag_name: v${{ needs.changelog.outputs.version }}
146+
name: agcp v${{ needs.changelog.outputs.version }}
147+
body: ${{ needs.changelog.outputs.changelog }}
148+
draft: true
149+
files: |
150+
artifacts/agcp-v${{ needs.changelog.outputs.version }}-*.tar.gz
151+
artifacts/agcp-v${{ needs.changelog.outputs.version }}-*.zip
152+
env:
153+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build output
2+
/target
3+
4+
# Legacy Node.js project
5+
antigravity-claude-proxy/
6+
7+
# User credentials and config (contain OAuth refresh tokens, personal settings)
8+
accounts.json
9+
config.toml
10+
11+
# Environment files
12+
.env
13+
.env.*
14+
15+
# Log files
16+
*.log
17+
18+
# Editor/IDE
19+
.vscode/
20+
.idea/
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+
29+
# AI agent working files
30+
docs/plans/
31+
.opencode/

0 commit comments

Comments
 (0)