Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .fern/metadata.json

This file was deleted.

5 changes: 1 addition & 4 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Files Fern must not overwrite or delete when regenerating this repo.
LICENSE
SECURITY.md
# Patched: excludes Fern's own entrypoint from Naming/FileName (generator bug).
.rubocop.yml
# Compatibility shim for the pre-1.0 require path.
lib/vitable_connect.rb
.github/workflows/publish-gem.yml
135 changes: 74 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,88 @@
name: ci

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
name: CI
on:
push:
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
runs-on: ubuntu-latest

build:
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/vitable-connect-ruby' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: "3.3"

- name: Install dependencies
run: bundle install

- name: Run Rubocop
run: bundle exec rubocop

test:
runs-on: ubuntu-latest
bundler-cache: false
- run: |-
bundle install

- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/vitable-connect-ruby' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Build and upload gem artifacts
if: |-
github.repository == 'stainless-sdks/vitable-connect-ruby' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
PACKAGE_NAME: vitable_connect
run: ./scripts/utils/upload-artifact.sh
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: "3.3"

- name: Install dependencies
run: bundle install

- name: Run Tests
run: bundle exec rake test

publish:
name: Publish to RubyGems.org
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')

permissions:
id-token: write
contents: write
bundler-cache: false
- run: |-
bundle install

- name: Run lints
run: ./scripts/lint
test:
timeout-minutes: 10
name: test
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: "3.3"

- name: Install dependencies
run: bundle install

- name: Configure RubyGems credentials
uses: rubygems/configure-rubygems-credentials@v1.0.0

- name: Build gem
run: bundle exec rake build
bundler-cache: false
- run: |-
bundle install

- name: Push gem to RubyGems
run: gem push pkg/*.gem
- name: Run tests
run: ./scripts/test
37 changes: 37 additions & 0 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Publishes the Fern-generated SDK to RubyGems.org via OIDC trusted publishing
# (the gem trusts this repo + workflow file; no token). Triggered when a
# GitHub release is published, or manually to re-publish after a failure.
#
# This file is listed in .fernignore so Fern regeneration preserves it.
name: Publish Gem
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
# Keep in sync with the RubyGems trusted publisher registration, which
# pins this environment name.
environment: prod
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v5

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: false

# Builds the gemspec and pushes via RubyGems trusted publishing.
- name: Publish to RubyGems.org
uses: rubygems/release-gem@v1
with:
await-release: false
22 changes: 22 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'Vitable-Inc/vitable-connect-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
RUBYGEMS_HOST: ${{ secrets.VITABLE_CONNECT_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
GEM_HOST_API_KEY: ${{ secrets.VITABLE_CONNECT_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
*.gem
.idea/
.ignore
.prism.log
.stdy.log
.ruby-lsp/
.yardoc/
bin/tapioca
Brewfile.lock.json
doc/
sorbet/tapioca/*
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.6.1"
}
Loading
Loading