@@ -2,19 +2,16 @@ name: Release
22
33on :
44 repository_dispatch :
5- types : [openapi-updated] # fired by the server repo on an OpenAPI change
5+ types : [openapi-updated]
66 schedule :
7- - cron : ' 0 6 * * *' # daily fallback, also covers an unwired dispatch
7+ - cron : ' 0 6 * * *'
88 workflow_dispatch :
99 inputs :
1010 version_bump :
1111 description : ' patch | minor | major'
1212 required : false
1313 default : ' patch'
1414
15- # Go has no package registry and no OIDC publish: a release is just a git tag that
16- # pkg.go.dev indexes through the module proxy. The only token needed is the default
17- # GITHUB_TOKEN for the commit and tag. There are no publish secrets.
1815permissions :
1916 contents : write
2017
@@ -24,16 +21,16 @@ jobs:
2421 steps :
2522 - uses : actions/checkout@v7
2623 with :
27- fetch-depth : 0 # need all tags to compute the next version
24+ fetch-depth : 0
2825 token : ${{ secrets.GITHUB_TOKEN }}
2926 - uses : actions/setup-go@v6
3027 with :
3128 go-version : stable
3229
33- - name : Regenerate from live spec
30+ - name : Regenerate from spec
3431 run : go run ./tools/roxygen generate
3532
36- - name : Detect drift
33+ - name : Detect changes
3734 id : diff
3835 run : |
3936 if git diff --quiet -- specs/openapi.json roxyapi.gen.go roxy.gen.go README.md AGENTS.md docs/llms-full.txt; then
6764 VER="$MA.$MI.$PA"
6865 sed -i "s/const Version = \".*\"/const Version = \"$VER\"/" version.go
6966 echo "version=$VER" >> "$GITHUB_OUTPUT"
70- echo "Next version: v$VER"
7167
7268 - name : Commit, tag, push
7369 if : steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
8076 git tag "v$V"
8177 git push --follow-tags
8278
83- - name : Prompt pkg.go.dev to index the new version
84- # The documented way to get a module indexed: ask the proxy for it via the go
85- # tool (handles module-path case encoding; no manual curl bang-encoding).
79+ - name : Index new version on pkg.go.dev
8680 if : steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
8781 env :
8882 GOPROXY : proxy.golang.org
0 commit comments