Skip to content

Commit b5aee82

Browse files
Merge pull request #20 from amberframework/codex/homebrew-release-setup
Add native scaffolding and Homebrew release path
2 parents df3c251 + f298ba0 commit b5aee82

File tree

89 files changed

+13361
-823
lines changed

Some content is hidden

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

89 files changed

+13361
-823
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: Release Checklist
3+
about: Track the full Amber CLI release flow from dry-run to announcement
4+
title: "Release checklist: vX.Y.Z"
5+
labels: ["release"]
6+
assignees: []
7+
---
8+
9+
## Release Goal
10+
11+
- Version:
12+
- Type: `rc` / `stable` / `patch`
13+
- Announcement target:
14+
15+
## Preflight
16+
17+
- [ ] All release-impacting PRs include `Why`, `Release Impact`, and `Verification`
18+
- [ ] Release notes draft is ready
19+
- [ ] `RELEASE_SETUP.md` matches the intended flow
20+
- [ ] Tap repo formula workflow is green on `main`
21+
22+
## Dry Run
23+
24+
- [ ] Run `gh workflow run release.yml --repo amberframework/amber_cli --ref <branch> -f ref=<branch>`
25+
- [ ] Confirm `Build darwin-arm64` passed
26+
- [ ] Confirm `Build linux-x86_64` passed
27+
28+
## Publish
29+
30+
- [ ] Tag pushed
31+
- [ ] GitHub release published
32+
- [ ] Release assets uploaded
33+
- [ ] Checksums uploaded
34+
35+
## Homebrew
36+
37+
- [ ] `Update Formula` completed in `amberframework/homebrew-amber_cli`
38+
- [ ] `Validate Install` passed on macOS
39+
- [ ] `Validate Install` passed on Ubuntu
40+
- [ ] Formula points at the new version and checksums
41+
42+
## Fresh Install Verification
43+
44+
- [ ] `brew tap amberframework/amber_cli`
45+
- [ ] `brew install amber_cli`
46+
- [ ] `brew test amber_cli`
47+
- [ ] `amber new smoke_app -y --no-deps`
48+
49+
## Post Release
50+
51+
- [ ] Announcement post updated or published
52+
- [ ] README and docs still match the released commands
53+
- [ ] Follow-up issues filed for anything deferred

.github/pull_request_template.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Why
2+
3+
- What problem does this change solve?
4+
- Why is this the right change now?
5+
6+
## What Changed
7+
8+
-
9+
10+
## Decision Record
11+
12+
- ADR updated: `none` / `docs/adr/XXXX-title.md`
13+
- Alternatives considered:
14+
- Why they were not chosen:
15+
16+
## Release Impact
17+
18+
- Install or release path affected: `yes` / `no`
19+
- SOP updated: `yes` / `no` / `not needed`
20+
- Other repos or follow-up work:
21+
22+
## Verification
23+
24+
-
25+
26+
## Risks And Rollback
27+
28+
- Risk level:
29+
- Rollback plan:

.github/workflows/build.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@ jobs:
2323

2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@v4
27-
28-
- name: Install Crystal (Ubuntu)
29-
if: matrix.os == 'ubuntu-latest'
30-
run: |
31-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
32-
33-
- name: Install Crystal (macOS)
34-
if: matrix.os == 'macos-latest'
35-
run: |
36-
brew update
37-
brew install crystal
26+
uses: actions/checkout@v6
27+
28+
- name: Install Crystal
29+
uses: crystal-lang/install-crystal@v1
30+
with:
31+
crystal: latest
3832

3933
- name: Cache shards
4034
uses: actions/cache@v4
@@ -49,28 +43,39 @@ jobs:
4943
- name: Install dependencies
5044
run: shards install
5145

46+
- name: Build LSP binary for integration specs
47+
run: |
48+
mkdir -p bin
49+
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp
50+
5251
- name: Run tests
5352
run: crystal spec
5453

55-
- name: Build binary (Linux)
54+
- name: Build binaries (Linux)
5655
if: matrix.target == 'linux-x86_64'
5756
run: |
5857
crystal build src/amber_cli.cr -o amber --release --static
59-
60-
- name: Build binary (macOS)
58+
crystal build src/amber_lsp.cr -o amber-lsp --release --static
59+
60+
- name: Build binaries (macOS)
6161
if: matrix.target == 'darwin-arm64'
6262
run: |
6363
crystal build src/amber_cli.cr -o amber --release
64-
65-
- name: Test binary
64+
crystal build src/amber_lsp.cr -o amber-lsp --release
65+
66+
- name: Test binaries
6667
run: |
6768
./amber --version
68-
./amber --help
69-
70-
- name: Upload build artifact
71-
uses: actions/upload-artifact@v4
69+
./amber
70+
./amber new --help
71+
./amber-lsp --help
72+
73+
- name: Upload build artifacts
74+
uses: actions/upload-artifact@v7
7275
if: github.event_name == 'workflow_dispatch'
7376
with:
7477
name: amber-cli-${{ matrix.target }}-build
75-
path: amber
76-
retention-days: 7
78+
path: |
79+
amber
80+
amber-lsp
81+
retention-days: 7

.github/workflows/ci.yml

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,17 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest]
1616
crystal: [latest]
17-
include:
18-
- os: ubuntu-latest
19-
crystal-install: |
20-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
21-
- os: macos-latest
22-
crystal-install: |
23-
brew install crystal
2417

2518
name: Test on ${{ matrix.os }} with Crystal ${{ matrix.crystal }}
2619

2720
steps:
2821
- name: Checkout code
29-
uses: actions/checkout@v4
30-
31-
- name: Install Crystal (Ubuntu)
32-
if: matrix.os == 'ubuntu-latest'
33-
run: |
34-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
35-
crystal version
36-
37-
- name: Install Crystal (macOS)
38-
if: matrix.os == 'macos-latest'
39-
run: |
40-
brew install crystal
41-
crystal version
22+
uses: actions/checkout@v6
4223

24+
- name: Install Crystal
25+
uses: crystal-lang/install-crystal@v1
26+
with:
27+
crystal: ${{ matrix.crystal }}
4328

4429

4530
- name: Cache shards
@@ -56,29 +41,40 @@ jobs:
5641
run: shards install
5742

5843
- name: Check code formatting
59-
run: crystal tool format --check
60-
continue-on-error: true
44+
run: crystal tool format --check src spec
6145

62-
- name: Run ameba linter
63-
run: ./bin/ameba
46+
- name: Run code climate checks
47+
run: ./bin/ameba src/amber_cli/native src/amber_lsp
6448
continue-on-error: true
6549

66-
- name: Compile project
67-
run: crystal build src/amber_cli.cr --no-debug
50+
- name: Compile CLI
51+
run: crystal build src/amber_cli.cr --no-debug -o amber
52+
53+
- name: Compile LSP
54+
run: crystal build src/amber_lsp.cr --no-debug -o amber-lsp
55+
56+
- name: Build LSP binary for integration specs
57+
run: |
58+
mkdir -p bin
59+
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp
6860
6961
- name: Run tests
7062
run: crystal spec
7163

72-
- name: Build release binary
73-
run: crystal build src/amber_cli.cr --release --no-debug -o amber_cli
64+
- name: Build release binaries
7465
if: matrix.os == 'ubuntu-latest'
66+
run: |
67+
crystal build src/amber_cli.cr --release --no-debug -o amber_cli
68+
crystal build src/amber_lsp.cr --release --no-debug -o amber_lsp
7569
76-
- name: Upload binary artifact (Linux)
77-
uses: actions/upload-artifact@v4
70+
- name: Upload binary artifacts (Linux)
71+
uses: actions/upload-artifact@v7
7872
if: matrix.os == 'ubuntu-latest'
7973
with:
80-
name: amber_cli-linux
81-
path: amber_cli
74+
name: amber-cli-linux
75+
path: |
76+
amber_cli
77+
amber_lsp
8278
8379
# Separate job for additional platform-specific tests
8480
platform-specific:
@@ -92,17 +88,12 @@ jobs:
9288

9389
steps:
9490
- name: Checkout code
95-
uses: actions/checkout@v4
96-
97-
- name: Install Crystal (Ubuntu)
98-
if: matrix.os == 'ubuntu-latest'
99-
run: |
100-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
91+
uses: actions/checkout@v6
10192

102-
- name: Install Crystal (macOS)
103-
if: matrix.os == 'macos-latest'
104-
run: |
105-
brew install crystal
93+
- name: Install Crystal
94+
uses: crystal-lang/install-crystal@v1
95+
with:
96+
crystal: latest
10697

10798
- name: Install dependencies
10899
run: shards install
@@ -113,6 +104,11 @@ jobs:
113104
./amber_cli --help || true
114105
./amber_cli --version || true
115106
107+
- name: Test LSP functionality
108+
run: |
109+
crystal build src/amber_lsp.cr -o amber_lsp
110+
test -x ./amber_lsp
111+
116112
# Job to run integration tests
117113
integration:
118114
runs-on: ubuntu-latest
@@ -121,11 +117,12 @@ jobs:
121117

122118
steps:
123119
- name: Checkout code
124-
uses: actions/checkout@v4
120+
uses: actions/checkout@v6
125121

126122
- name: Install Crystal
127-
run: |
128-
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
123+
uses: crystal-lang/install-crystal@v1
124+
with:
125+
crystal: latest
129126

130127
- name: Install dependencies
131128
run: shards install
@@ -136,4 +133,4 @@ jobs:
136133
crystal spec spec/integration/
137134
else
138135
echo "No integration tests found, skipping..."
139-
fi
136+
fi

0 commit comments

Comments
 (0)