3.2 KiB
3.2 KiB
Releasing bird
Target destinations:
- npm:
@yuta/bird - Gitea Packages:
https://git.yutakobayashi.com/api/packages/yuta/npm/ - Nix flake:
packages.<system>.birdandapps.<system>.default - Homebrew: tap formula in
steipete/homebrew-tap(e.g.,bird.rb)
Checklist (npm + Gitea)
-
Version bump
- Update
package.jsonversion(semver, e.g.,0.5.0). - Update
CHANGELOG.mdand tag the release section.
- Update
-
Clean build & tests
pnpm installpnpm testpnpm run buildnix build .#birdnix flake check
-
Publish to npmjs (scoped)
- Ensure you are logged in (
npm whoami). npm publish --access public(from repo root). Package name is@yuta/bird.- Verify:
npm view @yuta/bird versionnpx -y @yuta/bird@<version> --help
- Ensure you are logged in (
-
Publish to Gitea Packages
- Create a personal access token with package write permission and save it as the repository secret
PACKAGE_TOKEN. - Push a
v<version>tag or run thePublish npm packageworkflow manually. - The workflow writes npm auth for
https://git.yutakobayashi.com/api/packages/yuta/npm/and publishes@yuta/bird. - Verify:
npm view @yuta/bird version --registry=https://git.yutakobayashi.com/api/packages/yuta/npm/npm exec --yes --registry=https://git.yutakobayashi.com/api/packages/yuta/npm/ @yuta/bird@<version> -- --help
- Create a personal access token with package write permission and save it as the repository secret
-
Git tag & Gitea release
git tag v<version> && git push origin v<version>- Create a Gitea release from the tag. Include changelog notes and attach optional binary (see below).
Optional: attach compiled binary
If you want a single-file binary for Homebrew/Gitea release assets:
- Build:
pnpm run binary(uses Bun to produce./bird). - Upload
birdto the Gitea release and use it for the Homebrew tarball.
Homebrew tap update (steipete/homebrew-tap)
-
Package the binary
- From repo root:
tar -czf bird-macos-universal-v<version>.tar.gz bird - Compute SHA:
shasum -a 256 bird-macos-universal-v<version>.tar.gz
- From repo root:
-
Update formula in tap repo
- File:
homebrew-tap/bird.rb(create if absent). Model it afterpoltergeist.rb. - Fields to update:
url "https://git.yutakobayashi.com/yuta/bird/releases/download/v<version>/bird-macos-universal-v<version>.tar.gz"sha256 "<calculated_sha>"version "<version>"
- Install block:
bin.install "bird" test do: minimalassert_match "<version>", shell_output("#{bin}/bird --version")
- File:
-
Push tap changes
git add bird.rb && git commit -m "bird 0.1.0" && git push
Release order suggestion
- Merge to
mainand tag. - Publish npmjs.
- Let Gitea Actions publish the package to Gitea Packages.
- Build binary, upload to Gitea release.
- Update Homebrew tap with new URL/SHA.
Notes
- Scoped npm name (
@yuta/bird) requires--access publicon first publish. - Gitea npm registry auth follows Gitea's package registry format:
npm config set @yuta:registry=https://git.yutakobayashi.com/api/packages/yuta/npm/. - Homebrew formula assumes macOS universal binary; adjust URL/name if you ship per-arch.
- Config defaults (JSON5) and twitter safe relay setup are documented in
README.md— keep that in sync for each release.