feat(api): update via SDK Studio

This commit is contained in:
stainless-app[bot] 2025-06-27 14:36:16 +00:00
parent 06a27a0271
commit 6e58c71f23
7 changed files with 9 additions and 48 deletions

View file

@ -1,38 +0,0 @@
name: Create releases
on:
schedule:
- cron: '0 5 * * *' # every day at 5am UTC
push:
branches:
- main
jobs:
release:
name: release
if: github.ref == 'refs/heads/main' && github.repository == 'sst/opencode-sdk-python'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stainless-api/trigger-release-please@v1
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
- name: Install Rye
if: ${{ steps.release.outputs.releases_created }}
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'
- name: Publish to PyPI
if: ${{ steps.release.outputs.releases_created }}
run: |
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.OPENCODE_PYPI_TOKEN || secrets.PYPI_TOKEN }}

View file

@ -1,9 +1,13 @@
# workflow for re-running publishing to PyPI in case it fails for some reason
# you can run this workflow by navigating to https://www.github.com/sst/opencode-sdk-python/actions/workflows/publish-pypi.yml
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/sst/opencode-sdk-python/actions/workflows/publish-pypi.yml
name: Publish PyPI
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
name: publish

View file

@ -18,5 +18,4 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
PYPI_TOKEN: ${{ secrets.OPENCODE_PYPI_TOKEN || secrets.PYPI_TOKEN }}

View file

@ -1,4 +1,4 @@
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-3c79948402e96d2aae6e46095db2cf80759750d1b042d6f91281a72c415b14de.yml
openapi_spec_hash: f9c2fc5988f0a30397929995c2be2c85
config_hash: a588d4012d27a0d7894c151f8a032e15
config_hash: fddca9bc092956a3e82f3f3bdba448d1

View file

@ -20,7 +20,7 @@ or products provided by Opencode, please follow the respective company's securit
### Opencode Terms and Policies
Please contact hello@sst.dev for any questions or concerns regarding the security of our services.
Please contact support@sst.dev for any questions or concerns regarding the security of our services.
---

View file

@ -2,10 +2,6 @@
errors=()
if [ -z "${STAINLESS_API_KEY}" ]; then
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
fi
if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi

View file

@ -5,7 +5,7 @@ description = "The official Python library for the opencode API"
dynamic = ["readme"]
license = "Apache-2.0"
authors = [
{ name = "Opencode", email = "hello@sst.dev" },
{ name = "Opencode", email = "support@sst.dev" },
]
dependencies = [
"httpx>=0.23.0, <1",