Skip to content

Commit 4c0d4fd

Browse files
committed
Add gem push workflow and fix a Dockerfile style issue
1 parent 82115ea commit 4c0d4fd

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/gem-push.yml

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ COPY --from=development /usr/local/bundle /usr/local/bundle
5252
RUN bundle config set deployment 'true'
5353
RUN bundle install --local --path=/usr/local/bundle
5454

55-
CMD ['bundle', 'exec', 'rake']
55+
CMD ["bundle", "exec", "rake"]

0 commit comments

Comments
 (0)