File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "release-type" : " ruby" ,
55 "package-name" : " html2rss-web" ,
66 "version-file" : " config/version.rb" ,
7- "changelog-path" : " CHANGELOG.md"
7+ "changelog-path" : " CHANGELOG.md" ,
8+ "extra-files" : [
9+ {
10+ "type" : " json" ,
11+ "path" : " frontend/package.json" ,
12+ "jsonpath" : " $.version"
13+ },
14+ " public/openapi.yaml" ,
15+ " frontend/src/api/generated/client.gen.ts" ,
16+ " frontend/src/api/generated/sdk.gen.ts" ,
17+ " frontend/src/api/generated/types.gen.ts" ,
18+ " frontend/src/api/generated/index.ts"
19+ ]
820 }
921 }
1022}
Original file line number Diff line number Diff line change 4949 runs-on : ubuntu-latest
5050 steps :
5151 - uses : actions/checkout@v6
52+ with :
53+ token : ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }}
5254
5355 - uses : ruby/setup-ruby@v1
5456 with :
7173 working-directory : frontend
7274
7375 - name : Verify generated OpenAPI spec and client are up to date
76+ id : verify
7477 run : make openapi-verify
78+ continue-on-error : ${{ startsWith(github.head_ref, 'release-please--') }}
79+
80+ - name : Regenerate and commit OpenAPI artifacts on release PRs
81+ if : steps.verify.outcome == 'failure' && startsWith(github.head_ref, 'release-please--')
82+ run : |
83+ git config --global user.name "github-actions[bot]"
84+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
85+
86+ make openapi
87+ make openapi-client
88+
89+ git add public/openapi.yaml frontend/src/api/generated/
90+ git commit -m "chore: regenerate openapi spec and client for version bump"
91+ git push
92+
93+ echo "## OpenAPI artifacts regenerated" >> "$GITHUB_STEP_SUMMARY"
94+ echo "Version bump detected; OpenAPI spec and frontend client have been regenerated and committed." >> "$GITHUB_STEP_SUMMARY"
7595
7696 - name : Lint OpenAPI contract
7797 run : make openapi-lint
You can’t perform that action at this time.
0 commit comments