openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
.github/workflows/create-releases.yml
37lines · modeblame
bff8da95stainless-app[bot]1 years ago | 1 | name: Create releases |
| 2 | on: | |
| 3 | schedule: | |
| 4 | - cron: '0 5 * * *' # every day at 5am UTC | |
| 5 | push: | |
| 6 | branches: | |
| 7 | - main | |
| 8 | | |
| 9 | jobs: | |
| 10 | release: | |
| 11 | name: release | |
| 12 | if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-python' | |
| 13 | runs-on: ubuntu-latest | |
| 14 | environment: publish | |
| 15 | | |
| 16 | steps: | |
58184ad5Drew Hintz3 months ago | 17 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
bff8da95stainless-app[bot]1 years ago | 18 | |
daaf92f3stainless-app[bot]2 months ago | 19 | - uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1.4.0 |
bff8da95stainless-app[bot]1 years ago | 20 | id: release |
| 21 | with: | |
| 22 | repo: ${{ github.event.repository.full_name }} | |
| 23 | stainless-api-key: ${{ secrets.STAINLESS_API_KEY }} | |
| 24 | | |
e507a4ebstainless-app[bot]3 months ago | 25 | - name: Set up Rye |
bff8da95stainless-app[bot]1 years ago | 26 | if: ${{ steps.release.outputs.releases_created }} |
e507a4ebstainless-app[bot]3 months ago | 27 | uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8 |
| 28 | with: | |
| 29 | version: '0.44.0' | |
| 30 | enable-cache: true | |
bff8da95stainless-app[bot]1 years ago | 31 | |
| 32 | - name: Publish to PyPI | |
| 33 | if: ${{ steps.release.outputs.releases_created }} | |
| 34 | run: | | |
| 35 | bash ./bin/publish-pypi | |
| 36 | env: | |
| 37 | PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }} |