main
 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
 3name: Publish PyPI
 4on:
 5  workflow_dispatch:
 6
 7jobs:
 8  publish:
 9    name: publish
10    runs-on: ubuntu-latest
11    environment: publish
12
13    steps:
14      - uses: actions/checkout@v4
15
16      - name: Install Rye
17        run: |
18          curl -sSf https://rye.astral.sh/get | bash
19          echo "$HOME/.rye/shims" >> $GITHUB_PATH
20        env:
21          RYE_VERSION: '0.44.0'
22          RYE_INSTALL_OPTION: '--yes'
23
24      - name: Publish to PyPI
25        run: |
26          bash ./bin/publish-pypi
27        env:
28          PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }}