-
Notifications
You must be signed in to change notification settings - Fork 162
82 lines (79 loc) · 2.09 KB
/
Copy pathci.yml
File metadata and controls
82 lines (79 loc) · 2.09 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
name: CI
on:
push:
tags: ['v*']
branches: [master]
pull_request:
branches: ['**']
jobs:
# Tests are currently failing because they rely on a live YouTube account
# Until that issue is resolved, the tests are not very useful. Disabling them
# in CI for now.
# test:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# ruby:
# - '2.1'
# - '2.3'
# - '2.4'
# - '2.5'
# - '2.6'
# - '2.7'
# - '3.0'
# - '3.1'
# - '3.2'
# - '3.3'
# - jruby-head
# - truffleruby-head
#
# steps:
# - uses: actions/checkout@v4
# - uses: ruby/setup-ruby@v1
# with:
# ruby-version: ${{ matrix.ruby }}
# bundler-cache: true
# - run: bundle exec rspec --format doc
# - uses: codecov/codecov-action@v3
# if: matrix.ruby == '3.2'
# with:
# files: coverage/coverage.xml
yard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- run: bundle exec yardoc --fail-on-warning
check_version:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- run: bin/check-version
release:
# Disabling tests for now
# needs: [test, yard, check_version]
needs: [yard, check_version]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"