-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 952 Bytes
/
_publish-code.yml
File metadata and controls
39 lines (34 loc) · 952 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
33
34
35
36
37
38
39
name: Publish
on:
workflow_call:
workflow_dispatch:
jobs:
publish:
name: Publish to Rubygems
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Set credentials
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir ~/.gem
touch ~/.gem/credentials
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
chmod 600 ~/.gem/credentials
- name: Build the Gems
run: |
gem build mindee.gemspec --strict --output mindee.gem
gem build mindee-lite.gemspec --strict --output mindee-lite.gem
- name: Publish the Gems
run: |
# Push both generated files to Rubygems
gem push mindee.gem
gem push mindee-lite.gem