44 push :
55 branches-ignore :
66 - ' release-please*'
7+ workflow_dispatch :
8+ inputs :
9+ package :
10+ description : ' Package to publish'
11+ required : true
12+ type : choice
13+ options :
14+ - sdk
15+ - sdk-react-provider
16+ - openapi
17+ dry_run :
18+ description : ' Dry-run only (no actual publish)'
19+ required : false
20+ type : boolean
21+ default : false
722
823permissions : write-all
924
1025jobs :
1126 release-please :
27+ if : github.event_name == 'push'
1228 runs-on : ubuntu-latest
1329 outputs :
1430 release_created_sdk : ${{ steps.release.outputs['packages/sdk--release_created'] }}
@@ -40,14 +56,13 @@ jobs:
4056 echo "Release sha: ${{ steps.release.outputs.sha }}"
4157
4258 build :
59+ if : github.event_name == 'push'
4360 env :
4461 CI : ' true'
45-
4662 needs : [release-please]
4763 name : Build, Test and Lint
4864 timeout-minutes : 15
4965 runs-on : ubuntu-latest
50-
5166 steps :
5267 - uses : actions/checkout@v4
5368 with :
@@ -80,42 +95,60 @@ jobs:
8095
8196 publish-sdk :
8297 needs : [release-please, build]
83- if : needs.release-please.outputs.release_created_sdk == 'true'
98+ if : |
99+ always() &&
100+ needs.build.result != 'failure' &&
101+ (
102+ needs.release-please.outputs.release_created_sdk == 'true' ||
103+ (github.event_name == 'workflow_dispatch' && inputs.package == 'sdk')
104+ )
84105 permissions :
85106 id-token : write
86107 contents : read
87108 uses : ./.github/workflows/publish.yml
88109 secrets : inherit
89110 with :
90111 package : sdk
91- dry_run : false
92- skip_checks : true
112+ dry_run : ${{ inputs.dry_run == true }}
113+ skip_checks : ${{ github.event_name == 'push' }}
93114
94115 publish-sdk-react-provider :
95116 needs : [release-please, build]
96- if : needs.release-please.outputs.release_created_sdk_react_provider == 'true'
117+ if : |
118+ always() &&
119+ needs.build.result != 'failure' &&
120+ (
121+ needs.release-please.outputs.release_created_sdk_react_provider == 'true' ||
122+ (github.event_name == 'workflow_dispatch' && inputs.package == 'sdk-react-provider')
123+ )
97124 permissions :
98125 id-token : write
99126 contents : read
100127 uses : ./.github/workflows/publish.yml
101128 secrets : inherit
102129 with :
103130 package : sdk-react-provider
104- dry_run : false
105- skip_checks : true
131+ dry_run : ${{ inputs.dry_run == true }}
132+ skip_checks : ${{ github.event_name == 'push' }}
106133
107134 publish-openapi :
108135 needs : [release-please, build]
109- if : needs.release-please.outputs.release_created_openapi == 'true'
136+ if : |
137+ always() &&
138+ needs.build.result != 'failure' &&
139+ (
140+ needs.release-please.outputs.release_created_openapi == 'true' ||
141+ (github.event_name == 'workflow_dispatch' && inputs.package == 'openapi')
142+ )
110143 permissions :
111144 id-token : write
112145 contents : read
113146 uses : ./.github/workflows/publish.yml
114147 secrets : inherit
115148 with :
116149 package : openapi
117- dry_run : false
118- skip_checks : true
150+ dry_run : ${{ inputs.dry_run == true }}
151+ skip_checks : ${{ github.event_name == 'push' }}
119152
120153 # ── Deploy docs to GitHub Pages ───────────────────────────────────────────────
121154
@@ -124,7 +157,7 @@ jobs:
124157 name : github-pages
125158 runs-on : ubuntu-latest
126159 needs : [build, release-please]
127- if : github.ref == 'refs/heads/main'
160+ if : github.event_name == 'push' && github. ref == 'refs/heads/main'
128161 steps :
129162 - name : Deploy to GitHub Pages
130163 id : docs-deployment
0 commit comments