-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (33 loc) · 1.03 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run on push event
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'umbrellio/code-style'
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3
bundler-cache: true
working-directory: rubocop
- run: cd rubocop && bundle exec rake
release-gem:
runs-on: ubuntu-latest
environment: Deploy
permissions:
id-token: write
contents: write
# Run on push to master branch
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
working-directory: rubocop
- uses: rubygems/release-gem@v1
working-directory: rubocop