-
Notifications
You must be signed in to change notification settings - Fork 46
44 lines (38 loc) · 1.34 KB
/
create-releases.yml
File metadata and controls
44 lines (38 loc) · 1.34 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
38
39
40
41
42
43
44
name: Create releases
on:
push:
branches:
- main
workflow_dispatch:
jobs:
release:
name: release
if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-ruby'
runs-on: ubuntu-latest
environment: publish
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: stainless-api/trigger-release-please@bb6677c5a04578eec1ccfd9e1913b5b78ed64c61 # v1.4.0
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
- name: Set up Ruby
if: ${{ steps.release.outputs.releases_created }}
uses: ruby/setup-ruby@c515ec17f69368147deb311832da000dd229d338 # v1
with:
bundler-cache: false
ruby-version: '3.2'
- run: |
bundle install
- name: Publish to RubyGems.org
if: ${{ steps.release.outputs.releases_created }}
run: |
bash ./bin/publish-gem
env:
# `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org
RUBYGEMS_HOST: ${{ secrets.OPENAI_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
GEM_HOST_API_KEY: ${{ secrets.OPENAI_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}