Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: Release Checklist
about: Track the full Amber CLI release flow from dry-run to announcement
title: "Release checklist: vX.Y.Z"
labels: ["release"]
assignees: []
---

## Release Goal

- Version:
- Type: `rc` / `stable` / `patch`
- Announcement target:

## Preflight

- [ ] All release-impacting PRs include `Why`, `Release Impact`, and `Verification`
- [ ] Release notes draft is ready
- [ ] `RELEASE_SETUP.md` matches the intended flow
- [ ] Tap repo formula workflow is green on `main`

## Dry Run

- [ ] Run `gh workflow run release.yml --repo amberframework/amber_cli --ref <branch> -f ref=<branch>`
- [ ] Confirm `Build darwin-arm64` passed
- [ ] Confirm `Build linux-x86_64` passed

## Publish

- [ ] Tag pushed
- [ ] GitHub release published
- [ ] Release assets uploaded
- [ ] Checksums uploaded

## Homebrew

- [ ] `Update Formula` completed in `amberframework/homebrew-amber_cli`
- [ ] `Validate Install` passed on macOS
- [ ] `Validate Install` passed on Ubuntu
- [ ] Formula points at the new version and checksums

## Fresh Install Verification

- [ ] `brew tap amberframework/amber_cli`
- [ ] `brew install amber_cli`
- [ ] `brew test amber_cli`
- [ ] `amber new smoke_app -y --no-deps`

## Post Release

- [ ] Announcement post updated or published
- [ ] README and docs still match the released commands
- [ ] Follow-up issues filed for anything deferred
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Why

- What problem does this change solve?
- Why is this the right change now?

## What Changed

-

## Decision Record

- ADR updated: `none` / `docs/adr/XXXX-title.md`
- Alternatives considered:
- Why they were not chosen:

## Release Impact

- Install or release path affected: `yes` / `no`
- SOP updated: `yes` / `no` / `not needed`
- Other repos or follow-up work:

## Verification

-

## Risks And Rollback

- Risk level:
- Rollback plan:
51 changes: 28 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Crystal (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash

- name: Install Crystal (macOS)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install crystal
uses: actions/checkout@v6

- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest

- name: Cache shards
uses: actions/cache@v4
Expand All @@ -49,28 +43,39 @@ jobs:
- name: Install dependencies
run: shards install

- name: Build LSP binary for integration specs
run: |
mkdir -p bin
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp

- name: Run tests
run: crystal spec

- name: Build binary (Linux)
- name: Build binaries (Linux)
if: matrix.target == 'linux-x86_64'
run: |
crystal build src/amber_cli.cr -o amber --release --static

- name: Build binary (macOS)
crystal build src/amber_lsp.cr -o amber-lsp --release --static

- name: Build binaries (macOS)
if: matrix.target == 'darwin-arm64'
run: |
crystal build src/amber_cli.cr -o amber --release

- name: Test binary
crystal build src/amber_lsp.cr -o amber-lsp --release

- name: Test binaries
run: |
./amber --version
./amber --help

- name: Upload build artifact
uses: actions/upload-artifact@v4
./amber
./amber new --help
./amber-lsp --help

- name: Upload build artifacts
uses: actions/upload-artifact@v7
if: github.event_name == 'workflow_dispatch'
with:
name: amber-cli-${{ matrix.target }}-build
path: amber
retention-days: 7
path: |
amber
amber-lsp
retention-days: 7
89 changes: 43 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,17 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
crystal: [latest]
include:
- os: ubuntu-latest
crystal-install: |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
- os: macos-latest
crystal-install: |
brew install crystal

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

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Crystal (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
crystal version

- name: Install Crystal (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install crystal
crystal version
uses: actions/checkout@v6

- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}


- name: Cache shards
Expand All @@ -56,29 +41,40 @@ jobs:
run: shards install

- name: Check code formatting
run: crystal tool format --check
continue-on-error: true
run: crystal tool format --check src spec

- name: Run ameba linter
run: ./bin/ameba
- name: Run code climate checks
run: ./bin/ameba src/amber_cli/native src/amber_lsp
continue-on-error: true

- name: Compile project
run: crystal build src/amber_cli.cr --no-debug
- name: Compile CLI
run: crystal build src/amber_cli.cr --no-debug -o amber

- name: Compile LSP
run: crystal build src/amber_lsp.cr --no-debug -o amber-lsp

- name: Build LSP binary for integration specs
run: |
mkdir -p bin
crystal build src/amber_lsp.cr --no-debug -o bin/amber-lsp

- name: Run tests
run: crystal spec

- name: Build release binary
run: crystal build src/amber_cli.cr --release --no-debug -o amber_cli
- name: Build release binaries
if: matrix.os == 'ubuntu-latest'
run: |
crystal build src/amber_cli.cr --release --no-debug -o amber_cli
crystal build src/amber_lsp.cr --release --no-debug -o amber_lsp

- name: Upload binary artifact (Linux)
uses: actions/upload-artifact@v4
- name: Upload binary artifacts (Linux)
uses: actions/upload-artifact@v7
if: matrix.os == 'ubuntu-latest'
with:
name: amber_cli-linux
path: amber_cli
name: amber-cli-linux
path: |
amber_cli
amber_lsp

# Separate job for additional platform-specific tests
platform-specific:
Expand All @@ -92,17 +88,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Crystal (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
uses: actions/checkout@v6

- name: Install Crystal (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install crystal
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest

- name: Install dependencies
run: shards install
Expand All @@ -113,6 +104,11 @@ jobs:
./amber_cli --help || true
./amber_cli --version || true

- name: Test LSP functionality
run: |
crystal build src/amber_lsp.cr -o amber_lsp
test -x ./amber_lsp

# Job to run integration tests
integration:
runs-on: ubuntu-latest
Expand All @@ -121,11 +117,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Crystal
run: |
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
uses: crystal-lang/install-crystal@v1
with:
crystal: latest

- name: Install dependencies
run: shards install
Expand All @@ -136,4 +133,4 @@ jobs:
crystal spec spec/integration/
else
echo "No integration tests found, skipping..."
fi
fi
Loading
Loading