Add @girs dependency auto-update workflow#130
Merged
Conversation
Keep the @girs/* type dependencies on the latest stable release without manual bumps. - scripts/update-girs.mjs pins every @Girs dependency to its npm "latest" dist-tag as an exact version. Exact pins are required: the @Girs scheme encodes the library and ts-for-gir version in one semver string, so a stable suffix sorts below a release candidate and ranges resolve back to the rc (see #125). The script leaves protocol specifiers like "workspace:" untouched and does not rename packages. - "yarn update:girs" runs it for the package and the example. - .github/workflows/update-girs.yml runs daily (plus manual dispatch and a repository_dispatch "girs-release" hook), bumps, installs, validates, and opens/updates a single chore/update-girs PR only when something changed — as a draft with a warning if validation fails.
Collaborator
Author
|
These changes were merged prematurely by mistake; |
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.
Automates keeping the
@girs/*type dependencies on the latest stable release, so we don't have to bump them by hand after every ts-for-gir release.What it does
scripts/update-girs.mjs— pins every@girs/*dependency to its npmlatestdist-tag as an exact version. Exact pins are deliberate:@girsencodes the library version and the ts-for-gir version in a single semver string (e.g.2.88.0-4.0.4), which makes a stable suffix sort below a release-candidate suffix, so caret/tilde ranges resolve back to the rc instead of the stable release (this is the root cause of Dependency versions stuck on release candidate #125). The script only touches the version of existing@girs/*keys — it never adds, removes or renames packages, and leaves protocol specifiers likeworkspace:alone.yarn update:girs— convenience script that runs the above for both the package and thehello-worldexample..github/workflows/update-girs.yml— runs the bump on a daily schedule, on manualworkflow_dispatch, and on arepository_dispatchof typegirs-release. It installs, runs the full validation (build:types,prettier:check,validate:types,build:example,validate:example), and then opens or updates a singlechore/update-girsPR — but only when something actually changed. If validation fails (a new @Girs release needs code changes here), the PR is opened as a draft with a warning linking to the run, so the breakage surfaces as an actionable PR instead of a silent red run.Notes
girs-releaserepository_dispatchhook is there if we later want ts-for-gir to trigger it instantly (onegh api .../dispatchescall from its release workflow + a cross-repo token).GITHUB_TOKENdon't trigger the Build CI workflow, so the workflow runs the equivalent validation itself; the PR body notes this and how to get a separate Build CI run if wanted.main(default branch). After merge it can be smoke-tested from the Actions tab via Run workflow.Verified locally:
yarn update:girsproduces the expected exact-pin bumps end-to-end, the workflow YAML parses, and the full CI sequence is green on this branch.