From c54acbf24563dd01e6dcc050fd216f1c7b1c557e Mon Sep 17 00:00:00 2001 From: Rick Peyton Date: Tue, 7 Jan 2020 11:19:03 -0600 Subject: [PATCH] Add RubyGems push Github Action (#105) * Add RubyGems push Github Action This will push on a commit to master. I may go back and add back a validation step to this workflow to ensure the version has changed. * Add Matthew and move files into the .github folder * Only push on release --- CODEOWNERS => .github/CODEOWNERS | 2 +- .../CODE_OF_CONDUCT.md | 0 CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .../ISSUE_TEMPLATE.md | 0 .../PULL_REQUEST_TEMPLATE.md | 0 .github/workflows/gempush.yml | 28 +++++++++++++++++++ .travis.yml | 5 ---- 7 files changed, 29 insertions(+), 6 deletions(-) rename CODEOWNERS => .github/CODEOWNERS (56%) rename CODE_OF_CONDUCT.md => .github/CODE_OF_CONDUCT.md (100%) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) rename ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE.md (100%) rename PULL_REQUEST_TEMPLATE.md => .github/PULL_REQUEST_TEMPLATE.md (100%) create mode 100644 .github/workflows/gempush.yml delete mode 100644 .travis.yml diff --git a/CODEOWNERS b/.github/CODEOWNERS similarity index 56% rename from CODEOWNERS rename to .github/CODEOWNERS index 18743ff..be71718 100644 --- a/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # https://help.github.com/articles/about-codeowners/ -* @jwsloan @rickpeyton +* @jwsloan @rickpeyton @matthewmcgarvey diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/gempush.yml b/.github/workflows/gempush.yml new file mode 100644 index 0000000..ce7beb2 --- /dev/null +++ b/.github/workflows/gempush.yml @@ -0,0 +1,28 @@ +name: Ruby Gem + +on: + release: + types: [published] + +jobs: + build: + name: Build + Publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + 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 + gem build *.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b64d770..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -sudo: false -language: ruby -rvm: - - 2.4.1 -before_install: gem install bundler -v 1.14.6