-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (50 loc) · 1.3 KB
/
rspec_and_release.yml
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
name: Rspec and Release
on:
push:
pull_request:
workflow_dispatch:
jobs:
rspec:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['3.0', '3.1', '3.2']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Test with Rspec
run: |
bundle exec rspec --format documentation --require spec_helper
release:
needs: rspec
runs-on: ubuntu-latest
env:
BUNDLE_DEPLOYMENT: true
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Zip
run : |
zip -r datadog_backup.zip ./*
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_TOKEN }}
with:
semantic_version: 17
extra_plugins: |
@semantic-release/changelog@5
@semantic-release/git@9
semantic-release-rubygem@1