Bump version to 0.4.2 #7
Sign in to view logs
8000
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
name: Build + Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.0' | |
# Don't use bundler-cache: true to avoid frozen Gemfile.lock issues | |
bundler-cache: false | |
- name: Update Gemfile.lock | |
run: | | |
# Run bundle install without deployment mode to update Gemfile.lock | |
bundle install --jobs 4 | |
# Commit the updated Gemfile.lock if it changed | |
git config --local user.email "github-actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git diff --exit-code Gemfile.lock || git commit -m "Update Gemfile.lock for release" Gemfile.lock | |
- name: Run tests | |
run: bundle exec rake test | |
- name: Run linter | |
run: bundle exec rake standard | |
- name: Build gem | |
run: bundle exec rake build | |
- name: Publish to RubyGems | |
env: | |
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
run: | | |
mkdir -p ~/.gem | |
echo "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials | |
chmod 600 ~/.gem/credentials | |
gem push pkg/ivar-*.gem | |
rm -f ~/.gem/credentials |