File tree Expand file tree Collapse file tree 2 files changed +44
-5
lines changed Expand file tree Collapse file tree 2 files changed +44
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Create releases
2+ on :
3+ push:
4+ branches:
5+ - main
6+ workflow_dispatch:
7+
8+ jobs :
9+ release:
10+ name: release
11+ if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-ruby'
12+ runs-on: ubuntu-latest
13+ environment: publish
14+ permissions:
15+ contents: read
16+ id-token: write
17+
18+ steps:
19+ - uses: actions/checkout@v4
20+
21+ - uses: stainless-api/trigger-release-please@v1
22+ id: release
23+ with:
24+ repo: ${{ github.event.repository.full_name }}
25+ stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
26+
27+ - name: Set up Ruby
28+ if : ${{ steps.release.outputs.releases_created }}
29+ uses: ruby/setup-ruby@v1
30+ with:
31+ bundler-cache: false
32+ ruby-version: '3.1'
33+ - run: |-
34+ bundle install
35+
36+ - name: Publish to RubyGems.org
37+ if : ${{ steps.release.outputs.releases_created }}
38+ run: |
39+ bash ./bin/publish-gem
40+ env:
41+ # `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org
42+ RUBYGEMS_HOST: ${{ secrets.OPENAI_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
43+ GEM_HOST_API_KEY: ${{ secrets.OPENAI_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}
Original file line number Diff line number Diff line change 1- # This workflow is triggered when a GitHub release is created.
2- # It can also be run manually to re-publish to rubygems.org in case it failed for some reason.
1+ # Workflow for re-publishing to rubygems.org in case it failed for some reason.
32# You can run this workflow by navigating to https://www.github.com/openai/openai-python/actions/workflows/publish-gem.yml
43name : Publish Gem
54on :
65 workflow_dispatch :
76
8- release :
9- types : [published]
10-
117jobs :
128 publish :
139 name : publish
You can’t perform that action at this time.
0 commit comments