Skip to content

Commit

Permalink
Add release github action
Browse files Browse the repository at this point in the history
  • Loading branch information
chloerei committed Jul 26, 2023
1 parent 027bde5 commit 9702431
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
release:
types: [published]

jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- run: bundle exec rake
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
RUBYGEMS_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Test

on: [push, pull_request]

Expand Down

0 comments on commit 9702431

Please sign in to comment.