[CLD-1980]: ci: setup release pipeline for operations-gen#930
[CLD-1980]: ci: setup release pipeline for operations-gen#930graham-chainlink merged 1 commit intomainfrom
Conversation
|
| "private": true, | ||
| "scripts": { | ||
| "ci:changeset:publish": "pnpm changeset publish", | ||
| "ci:changeset:publish": "node ./scripts/release/tag-releases.mjs", |
There was a problem hiding this comment.
Refer to PR description why we need to do this
d58cd06 to
73ececa
Compare
There was a problem hiding this comment.
Pull request overview
Sets up a dedicated release stream for the tools/operations-gen Go submodule in this monorepo (Changesets metadata + GoReleaser config + tag-based CI), including Go subdirectory-module tagging (tools/operations-gen/vX.Y.Z) and surfacing release metadata in the CLI.
Changes:
- Add a workspace/package metadata layer for Changesets (
pnpm-workspace.yaml,tools/operations-gen/package.json) and document multi-package versioning guidance. - Add a custom CI tagging script (
scripts/release/tag-releases.mjs) and wire it intoci:changeset:publishto create bothvX.Y.Zandtools/operations-gen/vX.Y.Ztags. - Add operations-gen GoReleaser config + tag-triggered workflow, and add a
-versionflag to print build metadata.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/operations-gen/package.json | Introduces Changesets package metadata for the operations-gen submodule. |
| tools/operations-gen/main.go | Adds build metadata vars and -version flag output for releases. |
| tools/operations-gen/README.md | Documents version output and install/release/tagging semantics. |
| tools/operations-gen/.goreleaser.yml | Adds GoReleaser config for building/releasing operations-gen from subdir tags. |
| scripts/release/tag-releases.mjs | Implements custom tag creation/push for root and operations-gen release tags. |
| pnpm-workspace.yaml | Declares pnpm workspace packages (root + operations-gen). |
| package.json | Replaces ci:changeset:publish with the custom tagging script. |
| VERSIONING.md | Adds guidance for selecting packages + notes subdir tag format for operations-gen. |
| RELEASE.md | Documents dual tag formats and operations-gen tag-triggered releases. |
| .github/workflows/push-tag-release-operations-gen.yml | Triggers operations-gen GoReleaser on tools/operations-gen/v* tags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
73ececa to
ab51c67
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ab51c67 to
e5fda96
Compare
Setup changeset config and go releaser config JIRA: https://smartcontract-it.atlassian.net/browse/CLD-1980
e5fda96 to
685bb79
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "name": "operations-gen", | |||
There was a problem hiding this comment.
Is it possible to have the name as tools/operations-gen ? I am thinking if that works then we do not need the custom script in order to ensure that the release tag is valid for Go packages 🤔 Eg this could generate a tools/operations-gen/vx.y.z tag
There was a problem hiding this comment.
I tried it , it will generate the right name eg tools/operations-gen/0.4.0 but the version is missing v , and we want tools/operations-gen/v0.4.0, also when in this mono repo mode, changeset will also publish the root as chainlink-deployments-framework@0.94.1 instead of just v0.94.1
However when it is in single repo mode, it generates the v0.94.1 with v correctly, weird.
I jsut think that changeset doesnt work well with golang for go get
There was a problem hiding this comment.
Oh nice, maybe that can fix the version format, but we still have the issue with the root go mod that changeset will try to publish chainlink-deployments-framework@v0.94.1 instead of just v0.94.1 once we configure the mono repo mode with workspace
There was a problem hiding this comment.
You can also see that in cld-actions, the package on the root is release as cld-actions/vX.X.X instead of v.X.X.X that we want in cldf
There was a problem hiding this comment.
This is actually because we do not set this in cld-action https://github.com/smartcontractkit/.github/blob/4475ad7c475bacb1aefeccb132645149201ababd/actions/cicd-changesets/action.yml#L73-L78
So the release is using the full package name cld-action/vx.y.z
There was a problem hiding this comment.
For historical reference, pasting my findings here on why we can use cicd-changesets with current setup
i can get almost there, tags are correct but the workflow will failed because both changesets-tag-separator and changesets-root-version-package-path do not seem to work together, there is a piece of logic in signed commit action that is not handling this scenario correctly
we would need to update signed commit action, the cicd changeset action and finally we can use them in our repo. But i will go with my script for now and may put it a bug fix for the .github actions when i get some time.
DimitriosNaikopoulos
left a comment
There was a problem hiding this comment.
I left a suggestion that you might have already tried therefore I will approve this so you are not blocked. In general it would be better if we could avoid the custom logic around tags.
| @@ -0,0 +1,6 @@ | |||
| { | |||
| "name": "operations-gen", | |||


Setup changeset config and go releaser config
Similar to chainlink-protos here, i have to override the
ci:changeset:publishcommand with custom script. This is because changeset by default does not understand the tagging semantic for go.Per the go mod docs,
the tag has to be the format
<path-to-gomod>/v0.4.0. eg instead ofoperations-gen@0.4.0, we wanttools/operations-gen/v0.4.0. This means we have to perform tagging ourselvesJIRA: https://smartcontract-it.atlassian.net/browse/CLD-1980