Skip to content

Commit 2bef128

Browse files
committed
Ruby publish with github
1 parent 1b92c76 commit 2bef128

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

src/SDK/Language/Ruby.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ public function getFiles(): array
174174
],
175175
[
176176
'scope' => 'default',
177-
'destination' => '.travis.yml',
178-
'template' => 'ruby/.travis.yml.twig',
177+
'destination' => '.github/workflows/publish.yml',
178+
'template' => 'ruby/.github/workflows/publish.yml.twig',
179179
],
180180
[
181181
'scope' => 'definition',
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish to RubyGems
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
name: Release build and publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: 2.7
18+
bundler-cache: true
19+
20+
- name: Set up RubyGems
21+
run: |
22+
cat "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}\n" > ~/.gem/credentials
23+
chmod 0600 ~/.gem/credentials
24+
25+
- name: Build gem
26+
run: gem build {{ spec.title | caseLower }}.gemspec
27+
28+
- name: Publish gem
29+
run: gem push {{ spec.title | caseLower }}-*.gem

0 commit comments

Comments
 (0)