-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.11 KB
/
Copy pathruby.yml
File metadata and controls
48 lines (44 loc) · 1.11 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
45
46
47
48
name: Ruby SDK
on:
push:
branches: [master]
tags: ["ruby-v*"]
pull_request:
paths: ["ruby/**"]
workflow_dispatch:
inputs:
publish:
description: "Publish to RubyGems"
type: boolean
default: false
defaults:
run:
working-directory: ruby
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["3.0", "3.1", "3.2", "3.3"]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
working-directory: ruby
- run: bundle exec rake test
publish:
needs: test
if: startsWith(github.ref, 'refs/tags/ruby-v') || (github.event_name == 'workflow_dispatch' && inputs.publish)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
working-directory: ruby
- run: gem build framequery.gemspec
- run: gem push framequery-*.gem
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}