Skip to content

Commit

Permalink
Merge pull request #25 from mxenabled/bm/add_release_ci
Browse files Browse the repository at this point in the history
Add Release CI
  • Loading branch information
brettmortensen authored Aug 20, 2021
2 parents f4afa8f + 9595b4a commit a591f83
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches: [ master ]

jobs:
Release:
name: Release to RubyGems
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.6
- run: bundle install

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBY_GEMS_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
RUBY_GEMS_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"

0 comments on commit a591f83

Please sign in to comment.