Skip to content
Closed
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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Adapter guide
url: https://github.com/DevVig/microbridge/blob/main/docs/adapters.md
about: How to write a community adapter before opening an issue
- name: Install help
url: https://github.com/DevVig/microbridge/blob/main/INSTALL.md
about: Installation, launchd, and uninstall steps
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 5
- package-ecosystem: npm
directory: "/apps/microbridge-ui"
schedule:
interval: monthly
open-pull-requests-limit: 5
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,19 @@ jobs:
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace

ui:
name: ui
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/microbridge-ui
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: apps/microbridge-ui/package-lock.json
- run: npm ci
- run: npm run build
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
build:
name: build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-13
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
cargo build --release -p microbridged -p microbridgectl --target ${{ matrix.target }}
- name: Package
run: |
STAGE=microbridge-${{ github.ref_name }}-${{ matrix.target }}
mkdir -p "staging/${STAGE}"
cp "target/${{ matrix.target }}/release/microbridged" "staging/${STAGE}/"
cp "target/${{ matrix.target }}/release/microbridgectl" "staging/${STAGE}/"
cp README.md LICENSE-MIT LICENSE-APACHE INSTALL.md "staging/${STAGE}/"
tar -C staging -czf "${STAGE}.tar.gz" "${STAGE}"
echo "ASSET=${STAGE}.tar.gz" >> "$GITHUB_ENV"
- uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.target }}
path: ${{ env.ASSET }}

publish:
name: publish release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Collect assets
run: |
mkdir -p release-assets
find artifacts -name '*.tar.gz' -exec cp {} release-assets/ \;
ls -la release-assets
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: release-assets/*
body: |
## Install

```sh
./scripts/install-from-release.sh ${{ github.ref_name }}
```

Or from source: see [INSTALL.md](INSTALL.md).
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/target
node_modules/
.DS_Store
.magicpath-work/
apps/microbridge-ui/dist/
apps/microbridge-ui/src-tauri/target/
apps/microbridge-ui/src-tauri/gen/

# local working notes (not part of the public project)
/documentation/
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,32 @@ cargo run -p microbridged
node adapters/reference-echo/index.mjs # exercise the daemon end-to-end
```

End-user install paths are documented in [INSTALL.md](INSTALL.md)
(`./scripts/install.sh`, uninstall, releases).

## Before you push

```sh
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
# optional UI:
cd apps/microbridge-ui && npm ci && npm run build
```

Or `make ci`. CI enforces Rust checks on macOS/Linux and the UI build on Ubuntu.

## Releases

Push a version tag to publish binaries via GitHub Actions:

```sh
git tag v0.0.1
git push origin v0.0.1
```

CI enforces all three on macOS and Linux.
Assets are attached to the GitHub Release; users can run
`./scripts/install-from-release.sh v0.0.1`.

## Commits and PRs

Expand Down
Loading
Loading