You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trunk-based releases: build and release workflows, v1.0.0 - #18
Moves the Go SDK to the trunk-based release flow of the other ConvertAPI SDKs (convertapi-library-php/node/python): main only, a required build check, and a GitHub Release v{semver} by tomasr78 as the only way to release.
What changes
build.yml (replaces tests.yml): go mod verify, go mod tidy -diff, go vet, go build, go test -race on Go stable and oldstable. API tests run against https://stag-v2.convertapi.com with the CONVERTAPI_STAGING_TOKEN secret (Actions + Dependabot); without it they skip and the offline tests still run. The build job aggregates the matrix (a skipped required check would count as passed) and checks config.Version is SemVer, v0/v1 (no /vN module path) and not behind the latest tag.
release.yml: on a published Release, checks the publisher and the re-run actor, SemVer tag, major version vs module path, pre-release tick, tag on main, config.Version == tag; runs every test against staging; then go mod download <module>@<tag> through proxy.golang.org (verified by sum.golang.org) and checks the proxy's origin commit is the tag's; asks pkg.go.dev to fetch the version (warning only). No registry keys: a Go version is the tag.
Tests: offline tests against an httptest fake API (upload → convert → download, user info, error body, headers); the live tests skip without CONVERTAPI_TOKEN.
Library: config.Version = "1.0.0" (was the number 4) in the User-Agent; config.New(token, url, nil) no longer panics (typed-nil *http.Transport) and sets CaTransport; go vet copylocks fix in param.NewFile.
RELEASING.md, CHANGELOG.md, Dependabot (actions + gomod), README install snippet go get github.com/ConvertAPI/convertapi-go@v1.0.0.
Module path
Stays github.com/ConvertAPI/convertapi-go (the repo's old name, served via GitHub's redirect), which every existing user imports. Changing it would break all of them. v1.0.0 needs no /vN suffix. The unmerged v3 branch (API v3, renamed types/functions) is a breaking change and would ship as v2.0.0 with module path .../convertapi-go/v2; RELEASING.md describes it.
Verified locally (golang:1.27 and 1.26 containers): vet, build, tidy, and all 7 tests pass, including the 3 live ones against stag-v2.
- build.yml: go mod verify/tidy, vet, build and test -race on Go stable +
oldstable; API tests against stag-v2 with CONVERTAPI_STAGING_TOKEN, skipped
without it; `build` aggregator is the required check and checks
config.Version.
- release.yml: GitHub Release v{semver} by tomasr78 -> checks publisher,
re-run actor, tag, major version vs module path, main, config.Version;
tests; go mod download via proxy.golang.org (+ sum.golang.org) and checks
the proxy's origin commit; asks pkg.go.dev to fetch the version.
- Offline tests against an httptest fake API; live tests skip cleanly.
- config.Version = "1.0.0" in the User-Agent; config.New nil-transport panic
and missing CaTransport fixed; go vet copylocks fix in param.NewFile.
- RELEASING.md, CHANGELOG.md, dependabot, README install snippet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… from go mod download
Copilot review: a pre-release config.Version could pass below an existing
pre-release tag, and the .info URL did not case-encode uppercase pre-release
tags. The floor now compares against every v* tag by SemVer precedence, and
the origin commit comes from go mod download's own JSON.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Release concurrency needs correction, and the irreversible release process relies on external protection settings requiring human verification.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Prevent pending releases from canceling each other
.github/workflows/release.yml:40
This shared concurrency group keeps only one pending job, even with cancel-in-progress: false. If a release is running and two more are published, the newer pending job cancels the older one. That already-public version then misses validation and proxy fetching unless someone re-runs it. Include the release tag in the group so different versions cannot cancel each other's pending jobs.
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
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.
Moves the Go SDK to the trunk-based release flow of the other ConvertAPI SDKs (convertapi-library-php/node/python):
mainonly, a requiredbuildcheck, and a GitHub Releasev{semver}by tomasr78 as the only way to release.What changes
go mod verify,go mod tidy -diff,go vet,go build,go test -raceon Gostableandoldstable. API tests run against https://stag-v2.convertapi.com with theCONVERTAPI_STAGING_TOKENsecret (Actions + Dependabot); without it they skip and the offline tests still run. Thebuildjob aggregates the matrix (a skipped required check would count as passed) and checksconfig.Versionis SemVer, v0/v1 (no/vNmodule path) and not behind the latest tag.main,config.Version== tag; runs every test against staging; thengo mod download <module>@<tag>through proxy.golang.org (verified by sum.golang.org) and checks the proxy's origin commit is the tag's; asks pkg.go.dev to fetch the version (warning only). No registry keys: a Go version is the tag.httptestfake API (upload → convert → download, user info, error body, headers); the live tests skip withoutCONVERTAPI_TOKEN.config.Version = "1.0.0"(was the number 4) in the User-Agent;config.New(token, url, nil)no longer panics (typed-nil*http.Transport) and setsCaTransport;go vetcopylocks fix inparam.NewFile.go get github.com/ConvertAPI/convertapi-go@v1.0.0.Module path
Stays
github.com/ConvertAPI/convertapi-go(the repo's old name, served via GitHub's redirect), which every existing user imports. Changing it would break all of them. v1.0.0 needs no/vNsuffix. The unmergedv3branch (API v3, renamed types/functions) is a breaking change and would ship as v2.0.0 with module path.../convertapi-go/v2; RELEASING.md describes it.Verified locally (golang:1.27 and 1.26 containers): vet, build, tidy, and all 7 tests pass, including the 3 live ones against stag-v2.
🤖 Generated with Claude Code