ci: add Release Please and auto-publish the compiled .dict on release#7
Merged
Merged
Conversation
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'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the release automation the README's CI/CD section already promised ("On merge, the compiled
.dictis published as a GitHub Release artifact at a stable URL") and thatassemble.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 onmain; merging it tags the commit, updatesCHANGELOG.md, and creates a GitHub Release.Cargo.tomlin sync via agenericupdater annotation (version = "0.0.1" # x-release-please-version).release.yml— canonical two-job pattern:release-pleaseopens/merges the release PR and exposesrelease_created/tag_nameoutputs.publish-dict(gated onrelease_created == 'true') installs libvoikko + voikko-fi + JDK +just, runsjust generate(download corpus + jar → assemble → compile), then attachespuhekieli_fi-<tag>.dictandniinku-<tag>.combinedto the release viagh release upload.Docs — README CI/CD section + repo layout updated; README "Quick start" now points users at the Releases page for pre-built
.dictfiles; the staleassemble.ymlcomment is corrected.Why
simpleand notrustThe crates aren't published to crates.io and use an inherited
[workspace.package].version, which therustplugin handles poorly.simplecleanly owns the tag/changelog/release, and the generic annotation keepsCargo.tomlaccurate. The real deliverable is the.dict, not crate publishing.Why
publish-dictis a dependent job, noton: releaseReleases created with the default
GITHUB_TOKENdon't trigger downstream workflows (e.g.on: release: published). Runningpublish-dictas aneeds:-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, sincejustisn't on this box):fi_50k(50,000 lines) anddicttool_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,mä) all present.compile: dicttool produced a 46 KBpuhekieli_fi.dict. ✅cargo fmt --check,cargo test --workspace(36 tests), config JSON, and workflow YAML all validate;cargo metadataconfirms the inlineCargo.tomlcomment 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
ci.yml(sameGITHUB_TOKENlimitation). 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.0.0.1: afeat:will propose0.1.0(pre-1.0 default). Adjust later via config if you'd rather stay on0.0.x.https://claude.ai/code/session_018xYxT7WXd64cm6C2wSbkFq
Generated by Claude Code