Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup documentation + migrate CI+release process from travis to github actions #172

Merged
merged 4 commits into from
Jun 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I learned after introducing this is that there's also a variable repository_owner which in this case is voxpupuli. That brings our actions closer together and probably allows you to blindly copy-paste them between our gems.

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
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
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
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

gemspec

Expand All @@ -9,5 +9,5 @@ else
end

group :development do
gem 'github_changelog_generator', '~> 1.14'
gem 'github_changelog_generator', '>= 1.16.4'
end
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
facterdb
========

[![Build Status](https://img.shields.io/travis/camptocamp/facterdb/master.svg)](https://travis-ci.org/camptocamp/facterdb)
[![Gem Version](https://img.shields.io/gem/v/facterdb.svg)](https://rubygems.org/gems/facterdb)
[![Gem Downloads](https://img.shields.io/gem/dt/facterdb.svg)](https://rubygems.org/gems/facterdb)
[![Coverage Status](https://img.shields.io/coveralls/camptocamp/facterdb.svg)](https://coveralls.io/r/camptocamp/facterdb?branch=master)
[![License](https://img.shields.io/github/license/voxpupuli/facterdb.svg)](https://github.com/voxpupuli/facterdb/blob/master/LICENSE)
[![Test](https://github.com/voxpupuli/facterdb/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/facterdb/actions/workflows/test.yml)
[![Release](https://github.com/voxpupuli/facterdb/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/facterdb/actions/workflows/release.yml)
[![RubyGem Version](https://img.shields.io/gem/v/facterdb.svg)](https://rubygems.org/gems/facterdb)
[![RubyGem Downloads](https://img.shields.io/gem/dt/facterdb.svg)](https://rubygems.org/gems/facterdb)
[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)

A Gem that contains a lot of facts for a lot of Operating Systems.
Expand Down
13 changes: 6 additions & 7 deletions facterdb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "facterdb/version"

Gem::Specification.new do |s|
s.name = "facterdb"
s.name = 'facterdb'
s.version = FacterDB::Version::STRING
s.authors = ["Mickaël Canévet"]
s.email = ["mickael.canevet@camptocamp.com"]
s.homepage = "http://github.com/camptocamp/facterdb"
s.summary = "A Database of OS facts provided by Facter"
s.description = "Contains facts from many Facter version on many Operating Systems"
s.authors = ['Vox Pupuli']
s.email = ['voxpupuli@groups.io']
s.homepage = 'http://github.com/voxpupuli/facterdb'
s.summary = 'A Database of OS facts provided by Facter'
s.description = 'Contains facts from many Facter version on many Operating Systems'
s.licenses = 'Apache-2.0'

s.files = `git ls-files`.split("\n")
Expand All @@ -20,7 +20,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rake'
s.add_development_dependency 'pry'
s.add_development_dependency 'rspec'
s.add_development_dependency 'github_changelog_generator', '~> 1.10', '< 1.10.4'
s.add_runtime_dependency 'facter', '< 5.0.0'
s.add_runtime_dependency 'jgrep'
end