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