-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (25 loc) · 958 Bytes
/
publish-gem.yml
File metadata and controls
32 lines (25 loc) · 958 Bytes
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
name: Publish RubyGem
on:
push:
tags:
- 'v*.*.*' # triggers on version tags like v1.2.3
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # checkout the repository
- uses: ruby/setup-ruby@v1 # set up Ruby environment
with:
ruby-version: '3.2.8' # specify exact Ruby version
bundler-cache: true # enable bundler caching
- name: Build gem # build the gem package
run: gem build api_solvecaptcha.gemspec
- name: Set up RubyGems credentials # create ~/.gem/credentials with API key
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Publish to RubyGems # push the gem to RubyGems.org
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: gem push *.gem