Skip to content

ci: add Release Please and auto-publish the compiled .dict on release#7

Merged
laurigates merged 1 commit into
mainfrom
claude/release-please-dict-artifact
May 30, 2026
Merged

ci: add Release Please and auto-publish the compiled .dict on release#7
laurigates merged 1 commit into
mainfrom
claude/release-please-dict-artifact

Conversation

@laurigates

Copy link
Copy Markdown
Owner

Implements the release automation the README's CI/CD section already promised ("On merge, the compiled .dict is published as a GitHub Release artifact at a stable URL") and that assemble.yml's comment referenced as the "release-dict workflow (not yet authored)".

What this adds

Release Please (release-please-config.json + .release-please-manifest.json)

  • release-type: simple — maintains a release PR from Conventional Commits on main; merging it tags the commit, updates CHANGELOG.md, and creates a GitHub Release.
  • Keeps the workspace version in Cargo.toml in sync via a generic updater annotation (version = "0.0.1" # x-release-please-version).

release.yml — canonical two-job pattern:

  • release-please opens/merges the release PR and exposes release_created / tag_name outputs.
  • publish-dict (gated on release_created == 'true') installs libvoikko + voikko-fi + JDK + just, runs just generate (download corpus + jar → assemble → compile), then attaches puhekieli_fi-<tag>.dict and niinku-<tag>.combined to the release via gh release upload.

Docs — README CI/CD section + repo layout updated; README "Quick start" now points users at the Releases page for pre-built .dict files; the stale assemble.yml comment is corrected.

Why simple and not rust

The crates aren't published to crates.io and use an inherited [workspace.package].version, which the rust plugin handles poorly. simple cleanly owns the tag/changelog/release, and the generic annotation keeps Cargo.toml accurate. The real deliverable is the .dict, not crate publishing.

Why publish-dict is a dependent job, not on: release

Releases created with the default GITHUB_TOKEN don't trigger downstream workflows (e.g. on: release: published). Running publish-dict as a needs:-dependent job in the same run avoids that pitfall — no PAT required.

Verification

I ran the workflow's exact build path locally (replicating just generate, since just isn't on this box):

  • Downloaded OpenSubtitles fi_50k (50,000 lines) and dicttool_aosp.jar — network + URLs good.
  • assemble: curated (169) + OpenSubtitles (50,000) → Voikko filter → 7,550 puhekieli tokens written to .combined; example forms (miksköhän, saaks, oliks, niinku, ) all present.
  • compile: dicttool produced a 46 KB puhekieli_fi.dict. ✅
  • cargo fmt --check, cargo test --workspace (36 tests), config JSON, and workflow YAML all validate; cargo metadata confirms the inline Cargo.toml comment parses.

Downloaded corpus/jar and built artifacts are already covered by .gitignore (/data/cached/*, /data/out, *.dict, /dist, /tools/*.jar), so nothing build-generated is committed.

Notes / follow-ups

  • The release PR that Release Please opens won't itself trigger ci.yml (same GITHUB_TOKEN limitation). If you want CI to run on the release PR, swap the action's token for a PAT/GitHub App. Left as-is for now since it needs a secret.
  • First release from 0.0.1: a feat: will propose 0.1.0 (pre-1.0 default). Adjust later via config if you'd rather stay on 0.0.x.

https://claude.ai/code/session_018xYxT7WXd64cm6C2wSbkFq


Generated by Claude Code

Configures Release Please (release-please-config.json + manifest) to
maintain a release PR from Conventional Commits on main; merging it tags
the commit and creates a GitHub Release. The workspace version in
Cargo.toml is kept in sync via a generic updater annotation.

Adds release.yml with the canonical two-job pattern: release-please opens/
merges the release PR, and when it creates a release, publish-dict builds
the wordlist + compiles the .dict (just generate) and attaches
puhekieli_fi-<version>.dict and the .combined source to the release as a
stable, versioned download. Keeping publish-dict as a dependent job in the
same run (rather than an on:release trigger) sidesteps the GITHUB_TOKEN
'releases don't trigger workflows' limitation.

Updates the README CI/CD section and repo layout, and the now-stale
assemble.yml comment that referenced this workflow as 'not yet authored'.
@laurigates laurigates marked this pull request as ready for review May 30, 2026 16:49
@laurigates laurigates merged commit a39b6e9 into main May 30, 2026
1 check passed
@laurigates laurigates deleted the claude/release-please-dict-artifact branch May 30, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants