openai/openai-python
Publicmirrored fromhttps://github.com/openai/openai-pythonAvailable
.github/workflows/publish-pypi.yml
27lines · modecode
| 1 | # workflow for re-running publishing to PyPI in case it fails for some reason |
| 2 | # you can run this workflow by navigating to https://www.github.com/openai/openai-python/actions/workflows/publish-pypi.yml |
| 3 | name: Publish PyPI |
| 4 | on: |
| 5 | workflow_dispatch: |
| 6 | |
| 7 | jobs: |
| 8 | publish: |
| 9 | name: publish |
| 10 | runs-on: ubuntu-latest |
| 11 | |
| 12 | steps: |
| 13 | - uses: actions/checkout@v4 |
| 14 | |
| 15 | - name: Install Rye |
| 16 | run: | |
| 17 | curl -sSf https://rye-up.com/get | bash |
| 18 | echo "$HOME/.rye/shims" >> $GITHUB_PATH |
| 19 | env: |
| 20 | RYE_VERSION: 0.24.0 |
| 21 | RYE_INSTALL_OPTION: "--yes" |
| 22 | |
| 23 | - name: Publish to PyPI |
| 24 | run: | |
| 25 | bash ./bin/publish-pypi |
| 26 | env: |
| 27 | PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }} |
| 28 | |