feat(ci): setup Go version from go.mod if possible#465
Merged
Conversation
xnyo
commented
Dec 18, 2025
|
|
||
| - name: Install pnpm | ||
| if: steps.package-manager.outputs.name == 'pnpm' | ||
| if: ${{ steps.package-manager.outputs.name == 'pnpm' }} |
Member
Author
There was a problem hiding this comment.
No change in behavior, just for consistency with the other actions in the repo
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Go and Node.js version determination logic in the CI workflow to support reading versions from configuration files (go.mod and .nvmrc) when explicit versions are not provided.
Key changes:
- Adds support for go-version-file input to read Go version from go.mod
- Introduces a dedicated JavaScript step to centralize version determination logic
- Makes go-version and node-version inputs optional with fallback to version files or defaults
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| actions/internal/plugins/setup/action.yml | Updates input parameters to support both explicit versions and version files for Go and Node.js, making them optional instead of required |
| .github/workflows/ci.yml | Adds a new "Determine Go and Node versions" step using github-script action to centralize version resolution logic with fallback hierarchy (explicit → file → default) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
academo
approved these changes
Dec 19, 2025
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.
Part of #405. Part of #441.
Original PR: #460, split for easier reviewing.