From 3c9c8c4c8b75ec05238ecfcb0876a1e8a0f682ef Mon Sep 17 00:00:00 2001 From: Anay Nayak Date: Sat, 3 Jul 2021 15:15:24 +0530 Subject: [PATCH] Add release build --- .github/workflows/rubygem_release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/rubygem_release.yml diff --git a/.github/workflows/rubygem_release.yml b/.github/workflows/rubygem_release.yml new file mode 100644 index 0000000..5bceb1b --- /dev/null +++ b/.github/workflows/rubygem_release.yml @@ -0,0 +1,27 @@ +name: Ruby Gem Release + +on: + release: + +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}}"