Skip to content

Commit c1a4f59

Browse files
authored
Merge pull request #1 from openfoodfoundation/gem-push
Create workflow to push to RubyGems on release
2 parents dc0de2c + 925fd88 commit c1a4f59

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.github/workflows/gem-push.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Ruby Gem
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
name: Build + Publish
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Ruby 2.6
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3.1
20+
21+
- name: Publish to RubyGems
22+
run: |
23+
mkdir -p $HOME/.gem
24+
touch $HOME/.gem/credentials
25+
chmod 0600 $HOME/.gem/credentials
26+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27+
gem build *.gemspec
28+
gem push *.gem
29+
env:
30+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
rspec-sql (0.0.0)
4+
rspec-sql (0.0.1)
55
activesupport
66
rspec
77

rspec-sql.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = "rspec-sql"
3-
s.version = "0.0.0"
3+
s.version = "0.0.1"
44
s.summary = "RSpec::Sql matcher"
55
s.description = "RSpec matcher for database queries."
66
s.authors = ["Maikel Linke", "Open Food Network contributors"]

0 commit comments

Comments
 (0)