Skip to content

Commit

Permalink
Publish to GPR on release.
Browse files Browse the repository at this point in the history
  • Loading branch information
benpickles authored Sep 27, 2019
1 parent 3ff955c commit 7fa9e4c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gempush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Ruby Gem

on:
release:
types: [published]

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
version: 2.6.x

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
OWNER: username

0 comments on commit 7fa9e4c

Please sign in to comment.