Skip to content

Commit

Permalink
Add action to automate the gem release process
Browse files Browse the repository at this point in the history
  • Loading branch information
betogrun committed Nov 19, 2024
1 parent 82b1882 commit 15cec1d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Gem

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'ruby-3.0'
bundler-cache: true

- name: Install dependencies
run: bundle install

- name: Build gem
run: |
gem build *.gemspec
- 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 push *.gem
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Ability to import voters to a vote
- Automated gem release using GitHub Actions

## [0.3.0] - 2024-11-18

Expand Down

0 comments on commit 15cec1d

Please sign in to comment.