Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Go modules in subdirectories require path-prefixed tags (go/v0.1.12) rather than root-level tags (v0.1.12). Without these, users can only install via pseudo-versions and cannot pin to releases.

Changes

Added workflow step to create Go-specific tags after release:

  • Runs after GitHub release creation in publish.yml
  • Creates tags in format go/v{version} (e.g., go/v0.1.12)
  • Idempotent: skips gracefully if tag already exists
  • Applies to both latest and prerelease publishes

Result

Users can now:

# Pin to specific versions
go get github.com/github/copilot-sdk/go@v0.1.12

# List available versions
go list -m -versions github.com/github/copilot-sdk/go
# Output: v0.1.10 v0.1.11 v0.1.12

Previously limited to pseudo-versions like v0.0.0-20260115160841-b8a836b2c6a3.

Original prompt

This section details on the original issue you should resolve

<issue_title>Go SDK: Add submodule version tags for reproducible builds</issue_title>
<issue_description>## Summary

The Go SDK works via go get github.com/github/copilot-sdk/go@latest, but users cannot pin to specific versions like v0.1.12. This is because Go submodules require path-prefixed tags (go/v0.1.12) rather than root-level tags (v0.1.12).

Current Behavior

# Works - but uses pseudo-version
$ go get github.com/github/copilot-sdk/go@latest
go: added github.com/github/copilot-sdk/go v0.0.0-20260115160841-b8a836b2c6a3

# Fails - can't pin to release version
$ go get github.com/github/copilot-sdk/go@v0.1.12
go: module github.com/github/copilot-sdk@v0.1.12 found, but does not contain package github.com/github/copilot-sdk/go

# No versions visible
$ go list -m -versions github.com/github/copilot-sdk/go
github.com/github/copilot-sdk/go   # (empty - no versions)

Expected Behavior

$ go get github.com/github/copilot-sdk/go@v0.1.12
go: added github.com/github/copilot-sdk/go v0.1.12

$ go list -m -versions github.com/github/copilot-sdk/go
github.com/github/copilot-sdk/go v0.1.10 v0.1.11 v0.1.12

Root Cause

Per Go modules documentation:

If a module is defined in a subdirectory within the repository, that is, the module subdirectory portion of the module path is not empty, then each tag name must be prefixed with the module subdirectory, followed by a slash.

The Go SDK module is at github.com/github/copilot-sdk/go (subdirectory), so tags must be go/v0.1.12 format.

Currently, publish.yml creates root-level tags:

gh release create "v${{ needs.version.outputs.version }}" \

Suggested Fix

Add Go submodule tagging to the release workflow:

# In .github/workflows/publish.yml, add after github-release job or within it

- name: Tag Go SDK submodule
  run: |
    git tag "go/v${{ needs.version.outputs.version }}"
    git push origin "go/v${{ needs.version.outputs.version }}"

Or create a dedicated job similar to the npm/nuget/pypi publish jobs.

Impact

Capability Current With Fix
Install latest ✅ Works (pseudo-version) ✅ Works
Pin specific version ❌ Fails ✅ Works
Reproducible builds ⚠️ Pseudo-versions only ✅ Semantic versions
go list -m -versions ❌ Empty ✅ Shows all versions

Environment

  • Go: 1.25.5
  • macOS (also tested concept on Linux)
  • Repo: github/copilot-sdk

Validation

SDK compiles and runs fine with pseudo-version - this is purely about version tagging for reproducibility:

package main

import copilot "github.com/github/copilot-sdk/go"

func main() {
    client := copilot.NewClient(&copilot.ClientOptions{LogLevel: "error"})
    // Works! Client created: *copilot.Client
}

Happy to submit a PR if this approach looks right! 🚀</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: debug-agentic-workflow
Debug and refine agentic workflows using gh-aw CLI tools - analyze logs, audit runs, and improve workflow performance


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits January 16, 2026 17:26
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Co-authored-by: friggeri <106686+friggeri@users.noreply.github.com>
Copilot AI changed the title [WIP] Add submodule version tags for reproducible builds Add Go submodule version tags for reproducible builds Jan 16, 2026
Copilot AI requested a review from friggeri January 16, 2026 17:36
@friggeri friggeri marked this pull request as ready for review January 16, 2026 18:53
@friggeri friggeri requested a review from a team as a code owner January 16, 2026 18:53
Copilot AI review requested due to automatic review settings January 16, 2026 18:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated creation of Go submodule version tags to enable reproducible builds with semantic versioning. Go modules in subdirectories require path-prefixed tags (go/v0.1.12) rather than root-level tags (v0.1.12) to allow users to pin to specific versions.

Changes:

  • Added workflow step to create Go-specific tags after GitHub release creation
  • Tag format: go/v{version} (e.g., go/v0.1.12)
  • Applies to both latest and prerelease dist-tags with idempotent behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

friggeri and others added 2 commits January 16, 2026 12:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Go SDK: Add submodule version tags for reproducible builds

2 participants