Skip to content

Commit 57ac3be

Browse files
committed
feat(ci): add manual confirmation for v2 SDK publishing
This change introduces a workflow modification that requires manual confirmation before publishing the v2 SDK (mistralai.client namespace), which is still in WIP/alpha status. The workflow now also auto-publishes from the v1 branch without requiring manual confirmation. This ensures that only intentional publishing of the v2 SDK occurs while maintaining automated publishing for the stable v1 SDK.
1 parent fe77181 commit 57ac3be

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/sdk_publish_mistralai_sdk.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,25 @@ permissions:
66
statuses: write
77
"on":
88
workflow_dispatch:
9+
inputs:
10+
confirm_publish:
11+
description: 'WARNING: This will publish v2 SDK (mistralai.client namespace) which is still WIP/alpha. To publish v1 (mistralai namespace), use the v1 branch instead. Type "publish" to confirm.'
12+
required: false
13+
type: string
914
push:
1015
branches:
11-
- main
16+
- v1
1217
paths:
1318
- RELEASES.md
1419
- "*/RELEASES.md"
1520
jobs:
1621
publish:
22+
# Auto-publish from v1 branch; require manual confirmation from main
23+
if: |
24+
github.ref == 'refs/heads/v1' ||
25+
(github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish')
1726
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15
1827
secrets:
1928
github_access_token: ${{ secrets.GITHUB_TOKEN }}
2029
pypi_token: ${{ secrets.PYPI_TOKEN }}
21-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
30+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

0 commit comments

Comments
 (0)