-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 943 Bytes
/
publish.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
name: Publish Gem
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Set version
id: version
run: echo "version=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
- name: checkout
uses: actions/checkout@v3
- name: Setup Ruby using Bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7.1"
bundler-cache: true
bundler: "2.2"
- name: install gems
run: bundle install
- name: Setup Rubygems credentials
run: |
set +x
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.OSC_ROBOT_RUBYGEMS_TOKEN }}
EOF
chmod 0600 ~/.gem/credentials
- name: Publish Gem
run: |
bundle exec rake build
gem push pkg/ood_support-${{ steps.version.outputs.version }}.gem