forked from JackDanger/permanent_records
-
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.
Merge pull request JackDanger#104 from JackDanger/jackdanger/github-a…
…ctions Configuring GitHub Actions
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
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: Ruby Gem | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: gem publishing | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Ruby 2.6 | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.x | ||
|
||
- name: Publish to RubyGems | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
bin/gempush-if-changed | ||
env: | ||
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} |
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,31 @@ | ||
name: Tests | ||
|
||
on: push | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: | ||
- '2.3.x' | ||
- '2.4.x' | ||
- '2.5.x' | ||
- '2.6.x' | ||
rails: | ||
- '4.2.0' | ||
- '4.2.11.1' | ||
steps: | ||
- name: Install system dependencies | ||
run: sudo apt-get install -y libsqlite3-dev | ||
- uses: actions/checkout@master | ||
- name: Setup ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
architecture: 'x64' | ||
- run: gem install bundler && bundle && bundle exec rake | ||
env: | ||
AR_TEST_VERSION: ${{ matrix.rails }} | ||
|
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,8 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
if git diff --name-only HEAD..HEAD^ | egrep -q '^VERSION$'; then | ||
# The VERSION file changed in the last commit, build the gem and push | ||
gem build *.gemspec | ||
gem push *.gem | ||
fi |
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 @@ | ||
.github/workflows/test.yml |