Skip to content

Commit c71d4c9

Browse files
author
meorphis
committed
chore(internal): add back releases workflow
1 parent b15ac44 commit c71d4c9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/create-releases.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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:
17+
- uses: actions/checkout@v4
18+
19+
- uses: stainless-api/trigger-release-please@v1
20+
id: release
21+
with:
22+
repo: ${{ github.event.repository.full_name }}
23+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
24+
25+
- name: Install Rye
26+
if: ${{ steps.release.outputs.releases_created }}
27+
run: |
28+
curl -sSf https://rye.astral.sh/get | bash
29+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
30+
env:
31+
RYE_VERSION: '0.44.0'
32+
RYE_INSTALL_OPTION: '--yes'
33+
34+
- name: Publish to PyPI
35+
if: ${{ steps.release.outputs.releases_created }}
36+
run: |
37+
bash ./bin/publish-pypi
38+
env:
39+
PYPI_TOKEN: ${{ secrets.OPENAI_PYPI_TOKEN || secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)