forked from openai/openai-python
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.07 KB
/
create-releases.yml
File metadata and controls
37 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
- name: Set up Rye
if: ${{ steps.release.outputs.releases_created }}
uses: eifinger/setup-rye@c694239a43768373e87d0103d7f547027a23f3c8
with:
version: '0.44.0'
enable-cache: true
- 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 }}