From f8927b18bb59fa30535d07835a1358ba4420d623 Mon Sep 17 00:00:00 2001 From: Ed Lui <33198+erawk@users.noreply.github.com> Date: Wed, 4 Mar 2020 16:10:01 -0500 Subject: [PATCH] =?UTF-8?q?Create=20`gempush.yml`=20to=20use=20an=20action?= =?UTF-8?q?=20to=20publish=20to=20Github=20and=20Ru=E2=80=A6=20(#34)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create gempush.yml * Fix action to pin to ruby-version * Do rubygems first, then GPR * Test to see how GPR works * Remove github since our gemspec only allows rubygems, run on new tag --- .github/workflows/gempush.yml | 31 +++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/gempush.yml diff --git a/.github/workflows/gempush.yml b/.github/workflows/gempush.yml new file mode 100644 index 0000000..7bcb6f4 --- /dev/null +++ b/.github/workflows/gempush.yml @@ -0,0 +1,31 @@ +name: Ruby Gem + +on: + push: + tags: + - v* # Only run when we carve a new tag + +jobs: + build: + name: Build + Publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - 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 + gem build *.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} + + diff --git a/.gitignore b/.gitignore index b04a8c8..1617e29 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ # rspec failure tracking .rspec_status +bambora-client-*.gem