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
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release

on:
push:
tags:
- "v*.*.*"

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
packages: write
env:
HUB_IMAGE: ghcr.io/corbitsdev/corbits-builder-hub
SIDECAR_IMAGE: ghcr.io/corbitsdev/corbits-builder-sidecar
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: version
run: |
version=$(jq -r .version package.json)
if [ "$GITHUB_REF_NAME" != "v$version" ]; then
echo "::error::Tag $GITHUB_REF_NAME does not match package.json version $version"
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: deploy/Dockerfile
target: hub
push: true
tags: ${{ env.HUB_IMAGE }}:${{ steps.version.outputs.version }}
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: .
file: deploy/Dockerfile
target: sidecar
push: true
tags: ${{ env.SIDECAR_IMAGE }}:${{ steps.version.outputs.version }}
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.version.outputs.version }}
run: |
notes="$RUNNER_TEMP/notes.md"
cat > "$notes" <<EOF
Images:

- \`$HUB_IMAGE:$VERSION\`
- \`$SIDECAR_IMAGE:$VERSION\`

[docs/SELF_HOST.md](https://github.com/$GITHUB_REPOSITORY/blob/$GITHUB_REF_NAME/docs/SELF_HOST.md) covers self-hosting; set the hub and sidecar `image:` to these refs instead of building.
EOF
prerelease=()
if [[ "$VERSION" == 0.* || "$VERSION" == *-* ]]; then
prerelease=(--prerelease)
fi
gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag \
--generate-notes --notes-file "$notes" "${prerelease[@]}"
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ change follows, whether a person or a coding agent writes it.
`vendor/interchange.manifest.json`; `bun run vendor:verify` fails on
anything unrecorded.

## Releasing

Maintainers bump `version` in the root, `apps/hub`, `apps/web`,
`packages/client` and `packages/schemas` package.json files, run
`bun install`, and merge. Then `git tag -s vX.Y.Z && git push origin vX.Y.Z`
publishes the hub and sidecar images and the GitHub release; a 0.x version or
one with a `-` suffix is marked a pre-release.

## Security

Report vulnerabilities through [SECURITY.md](https://github.com/corbitsdev/corbits-builder/blob/main/SECURITY.md), never a public
Expand Down
2 changes: 1 addition & 1 deletion apps/hub/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corbits-builder/hub",
"version": "0.0.0",
"version": "0.1.0-rc.1",
"private": true,
"license": "SEE LICENSE IN ../../LICENSE.md",
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
Expand Down
3 changes: 2 additions & 1 deletion apps/hub/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import { requestErrorMetadata } from "./request-error.ts";
import { createLiveAppProxy } from "./live-app/proxy.ts";
import { createLiveAppRunner } from "./live-app/runner.ts";
import { mountWebUi } from "./web-ui.ts";
import { version } from "../package.json";

const log = getLogger(["corbits-builder", "hub"]);

Expand Down Expand Up @@ -569,7 +570,7 @@ export async function createHubRuntime(
);
mountHubOpenAPI(app, {
config,
version: "0.0.0",
version,
securitySchemes: {
sessionCookie: {
type: "apiKey",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corbits-builder/web",
"version": "0.0.0",
"version": "0.1.0-rc.1",
"private": true,
"description": "Builder portal (Vite + React). Composes the hub's authenticated APIs.",
"license": "SEE LICENSE IN ../../LICENSE.md",
Expand Down
8 changes: 4 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "corbits-builder",
"version": "0.0.0",
"version": "0.1.0-rc.1",
"private": true,
"description": "Builder turns an idea into approved documents, a design and a working web app, with agents on the model provider you choose.",
"license": "SEE LICENSE IN LICENSE.md",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corbits-builder/client",
"version": "0.0.0",
"version": "0.1.0-rc.1",
"private": true,
"license": "SEE LICENSE IN ../../LICENSE.md",
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
Expand Down
2 changes: 1 addition & 1 deletion packages/schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@corbits-builder/schemas",
"version": "0.0.0",
"version": "0.1.0-rc.1",
"private": true,
"license": "SEE LICENSE IN ../../LICENSE.md",
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
Expand Down