-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 990 Bytes
/
build.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
on:
push:
branches:
- main
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
jobs:
ruby:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/[email protected]
with:
ruby-version: 3.0
# bundler-cache: true
- name: Install packages
run: gem install bundler:'~> 2.4.9' && bundle install
- name: Run build
run: |
bundle exec rake --trace
bundle exec rake build --trace
- name: Deploy to RubyGems
if: github.ref != 'refs/heads/main' && github.event_name == 'push'
run: |
bundle exec rake publish_git_tag --trace
gem push pkg/*.gem -V
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
- name: After build
if: github.ref != 'refs/heads/main' && github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "setup push to main"