Commit b6ba4876
Changed files (6)
.github/workflows/ci.yml
@@ -11,7 +11,6 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest
- if: github.repository == 'openai/openai-python'
steps:
- uses: actions/checkout@v4
@@ -33,7 +32,6 @@ jobs:
test:
name: test
runs-on: ubuntu-latest
- if: github.repository == 'openai/openai-python'
steps:
- uses: actions/checkout@v4
.github/workflows/create-releases.yml
@@ -1,39 +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 == 'openai/openai-python'
- runs-on: ubuntu-latest
- environment: publish
-
- 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.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }}
.github/workflows/publish-pypi.yml
@@ -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/openai/openai-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/openai/openai-python/actions/workflows/publish-pypi.yml
name: Publish PyPI
on:
workflow_dispatch:
+ release:
+ types: [published]
+
jobs:
publish:
name: publish
.github/workflows/release-doctor.yml
@@ -19,5 +19,4 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
- STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }}
bin/check-release-environment
@@ -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 OPENAI_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
fi
.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 81
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c8579861bc21d4d2155a5b9e8e7d54faee8083730673c4d32cbbe573d7fb4116.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c8579861bc21d4d2155a5b9e8e7d54faee8083730673c4d32cbbe573d7fb4116.yml