-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate CI+release from Travis to GitHub Actions
- Loading branch information
1 parent
ef93954
commit f46eea8
Showing
3 changed files
with
59 additions
and
24 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,31 @@ | ||
name: Release | ||
|
||
on: | ||
create: | ||
ref_type: tag | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'voxpupuli/facterdb' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Ruby 3.0 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
env: | ||
BUNDLE_WITHOUT: release | ||
- name: Build gem | ||
run: gem build *.gemspec | ||
- name: Publish gem to rubygems.org | ||
run: gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' | ||
- name: Setup GitHub packages access | ||
run: | | ||
mkdir -p ~/.gem | ||
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials | ||
chmod 0600 ~/.gem/credentials | ||
- name: Publish gem to GitHub packages | ||
run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Test | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: | ||
- '2.5' | ||
- '2.6' | ||
- '2.7' | ||
- '3.0' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Ruby ${{ matrix.ruby }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
env: | ||
BUNDLE_WITHOUT: release | ||
- name: Run tests | ||
run: bundle exec rake spec |
This file was deleted.
Oops, something went wrong.