-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the gem to work with ruby 3.3 and switch to github actions
Fix `File.exists?` error -> `File.exist?` is now used
- Loading branch information
Showing
7 changed files
with
68 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build & Test | ||
run-name: Build & Test - ${{ github.ref_name }} | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
jobs: | ||
version-check: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.ref, 'master')" | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Gem versioned correctly | ||
shell: sh | ||
run: | | ||
CHANGED=$(git diff origin/master HEAD --name-only | grep 'lib/hellgrid') || exit 0 | ||
[[ -z "$CHANGED" ]] || (echo "$CHANGED" | grep 'version.rb') || exit 1 | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.3 | ||
bundler-cache: true | ||
|
||
- name: Run tests | ||
run: bundle exec rspec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy to RubyGems | ||
run-name: ${{ github.actor }} is publishing a new version | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-gem: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.3' | ||
bundler-cache: true | ||
|
||
- name: Build gem | ||
run: gem build hellgrid.gemspec | ||
|
||
- name: Publish gem | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: | | ||
gem push hellgrid-*.gem |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Hellgrid | ||
VERSION = '0.3.5' | ||
VERSION = '0.4.0' | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
require 'simplecov' | ||
SimpleCov.start | ||
|
||
require 'fileutils' | ||
require 'hellgrid' | ||
require 'hellgrid/project' | ||
|