forked from danielsdeleo/moqueue
-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (35 loc) · 883 Bytes
/
publish-gem.yml
File metadata and controls
42 lines (35 loc) · 883 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
40
41
42
name: Publish Gem to GitHub Packages
on:
push:
tags:
- "v*"
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.5"
bundler-cache: true
- name: Build gem
run: gem build *.gemspec
- name: Configure gem credentials
run: |
mkdir -p ~/.gem
cat << EOF > ~/.gem/credentials
---
:github: Bearer ${{ secrets.GITHUB_TOKEN }}
EOF
chmod 0600 ~/.gem/credentials
- name: Push to GitHub Packages
run: |
gem push --key github \
--host https://rubygems.pkg.github.com/customink \
*.gem