Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Update Changelog

on:
workflow_dispatch: # manual trigger
# schedule:
# - cron: "0 0 * * 1" # every Monday (optional)

jobs:
changelog:
permissions:
contents: write
uses: weekendsuperhero-io/platform-tools/.github/workflows/reusable-changelog.yml@main
with:
changelog-path: CHANGELOG.md
pr-branch-prefix: "chore/changelog-"
secrets: inherit
73 changes: 9 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,17 @@
# CI — runs on push/PR to main
#
# Run locally before pushing:
# ./ci-check.sh --fix # auto-fix formatting + clippy
# ./ci-check.sh # check only (same as CI)

name: CI
name: CI Agent Mail

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.94
with:
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Check formatting
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build --all-features

- name: Run tests
run: cargo test --all-features

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.94

- name: Build documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings
ci:
uses: weekendsuperhero-io/platform-tools/.github/workflows/reusable-rust-ci.yml@main
with:
check-os-json: '["ubuntu-latest","macos-latest","windows-latest"]'
rust-cache-provider: github
docs-os: ubuntu-latest
linux-packages: "libdbus-1-dev pkg-config"
build-matrix-json: "[]"
Comment on lines +11 to +17
12 changes: 12 additions & 0 deletions .github/workflows/pr-desc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Update PR Description

on:
pull_request:
types: [opened, edited]

jobs:
update-pr:
uses: weekendsuperhero-io/platform-tools/.github/workflows/reusable-pr-description.yml@main
with:
trigger-phrase: "@agent pr-title" # optional — only runs if this phrase is in the PR body
secrets: inherit
Comment on lines +9 to +12
211 changes: 23 additions & 188 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,192 +5,27 @@
tags:
- "v*"

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
validate:
name: Validate Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.94
with:
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-release-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-release-cargo-

- name: Check formatting
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run tests
run: cargo test --all-features

build-binaries:
name: Build (${{ matrix.name }})
needs: validate
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: linux-x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: agentmail
archive: agentmail-linux-x86_64.tar.gz
- name: linux-aarch64
os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
binary: agentmail
archive: agentmail-linux-aarch64.tar.gz
- name: macos-x86_64
os: macos-latest
target: x86_64-apple-darwin
binary: agentmail
archive: agentmail-macos-x86_64.tar.gz
- name: macos-aarch64
os: macos-latest
target: aarch64-apple-darwin
binary: agentmail
archive: agentmail-macos-aarch64.tar.gz
- name: windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
binary: agentmail.exe
archive: agentmail-windows-x86_64.zip
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.94
with:
targets: ${{ matrix.target }}

- name: Cache cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-release-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-release-cargo-

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Package (unix)
if: runner.os != 'Windows'
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../${{ matrix.archive }} ${{ matrix.binary }}
cd ../../..

- name: Package (windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path "target/${{ matrix.target }}/release/${{ matrix.binary }}" -DestinationPath "${{ matrix.archive }}"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.archive }}

# Build macOS universal binary from the two arch-specific builds
build-macos-universal:
name: Build (macos-universal)
needs: build-binaries
runs-on: macos-latest
steps:
- name: Download macOS artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create universal binary
run: |
mkdir -p work
cd work
tar xzf ../artifacts/macos-aarch64/agentmail-macos-aarch64.tar.gz
mv agentmail agentmail-arm64
tar xzf ../artifacts/macos-x86_64/agentmail-macos-x86_64.tar.gz
mv agentmail agentmail-x86_64
lipo -create -output agentmail agentmail-arm64 agentmail-x86_64
file agentmail
tar czf ../agentmail-macos-universal.tar.gz agentmail

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos-universal
path: agentmail-macos-universal.tar.gz

create-release:
name: Create GitHub Release
needs: [build-binaries, build-macos-universal]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Collect release assets
run: |
mkdir -p release
cp artifacts/linux-x86_64/*.tar.gz release/
cp artifacts/linux-aarch64/*.tar.gz release/
cp artifacts/macos-x86_64/*.tar.gz release/
cp artifacts/macos-aarch64/*.tar.gz release/
cp artifacts/macos-universal/*.tar.gz release/
cp artifacts/windows-x86_64/*.zip release/
ls -lh release/

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: release/*

publish-crates-io:
name: Publish to crates.io
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.94

- name: Update lockfile
run: cargo generate-lockfile

- name: Publish agentmail (library + binary + mcp)
run: cargo publish -p agentmail
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
release:
uses: weekendsuperhero-io/platform-tools/.github/workflows/reusable-rust-release.yml@main
with:
validate-runs-on: ubuntu-latest
rust-cache-provider: github
validate-linux-packages: "libdbus-1-dev pkg-config"
# Optional override if binary cannot be inferred from Cargo.toml
# binary-name: agentmail
binary-matrix-json: >-
[
{"name":"linux-x86_64","os":"ubuntu-latest","target":"x86_64-unknown-linux-gnu"},
{"name":"linux-aarch64","os":"ubuntu-24.04-arm","target":"aarch64-unknown-linux-gnu"},
{"name":"macos-x86_64","os":"macos-latest","target":"x86_64-apple-darwin"},
{"name":"macos-aarch64","os":"macos-latest","target":"aarch64-apple-darwin"},
{"name":"windows-x86_64","os":"windows-latest","target":"x86_64-pc-windows-msvc"}
]
enable-macos-universal: true
# Optional overrides if your artifact names differ:
# macos-universal-arm64-artifact: macos-aarch64
# macos-universal-x86_64-artifact: macos-x86_64
publish-crates-io: true
cargo-publish-command: cargo publish
secrets: inherit
Comment on lines +10 to +31
Loading
Loading