Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 1.9 KB

File metadata and controls

69 lines (55 loc) · 1.9 KB

Release Workflow

Use this workflow when publishing a new version (backend + frontend + GitHub release + Docker Hub images).

One-Command Release

From repo root:

./scripts/release.sh

Default behavior with no version argument:

  • Read latest git tag vX.Y.Z
  • Auto-bump patch to vX.Y.(Z+1)
  • Sync versions to:
  • Cargo.toml ([package].version)
  • package.json (root)
  • frontend/package.json
  • Build + publish everything

Optional Version Controls

# Exact version
./scripts/release.sh v1.0.3
./scripts/release.sh 1.0.3

# Auto-bump modes
./scripts/release.sh --patch   # default
./scripts/release.sh --minor
./scripts/release.sh --major

What the Script Does

  1. Validate environment (git/cargo/npm/podman/gh) and authentication.
  2. Require a clean working tree.
  3. Resolve target version (explicit or auto-bumped).
  4. Update versions in Rust + frontend + root package files.
  5. Build frontend (frontend/dist).
  6. Build backend binaries:
  • x86_64-unknown-linux-musl
  • aarch64-unknown-linux-musl
  1. Commit and tag:
  • commit message: release: vX.Y.Z
  • annotated tag: vX.Y.Z
  • If version files already match the target version, skip the release commit and tag the current commit.
  1. Push branch and tag to GitHub.
  2. Build Docker images (explicit platforms):
  • --platform linux/amd64 -> docker.io/givenge/reader-rust:vX.Y.Z-x86_64
  • --platform linux/arm64 -> docker.io/givenge/reader-rust:vX.Y.Z-aarch64
  1. Verify image architecture locally.
  2. Push versioned image tags.
  3. Update and push rolling tags:
  • latest (x86_64)
  • latest-aarch64 (arm64)
  1. Create GitHub Release using generated notes.

Notes

  • Docker repository defaults to docker.io/givenge/reader-rust.
  • Override repository if needed:
DOCKER_REPO=docker.io/yourname/reader-rust ./scripts/release.sh
  • If release already exists or tag exists, script exits early to avoid accidental overwrite.