-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.13 KB
/
specific-gem-push.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
name: Release icon pack specific gem to RubyGems.org
on:
workflow_call:
inputs:
pack_name:
description: 'The name of the icon pack'
required: true
type: string
jobs:
build-and-publish:
name: Build and Publish Package to RubyGems.org
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby 3.3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
- name: Check release validity
run: sh .github/scripts/check-release.sh
- name: Prepare icon pack specific gem
run: sh .github/scripts/prepare-new-gem.sh ${{ inputs.pack_name }}
- name: Publish to RubyGems
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gemspec_file="phlex-icons-${{ inputs.pack_name }}.gemspec"
gem build "$gemspec_file"
gem push *.gem