Skip to content

Merge pull request #6 from Sage/omniauth-lock #7

Merge pull request #6 from Sage/omniauth-lock

Merge pull request #6 from Sage/omniauth-lock #7

Workflow file for this run

name: CI
on: [push]
env:
CI_BRANCH: "${{ github.ref_name }}"
BUNDLE_SAGEONEGEMS__JFROG__IO: "${{ secrets.BUNDLE_SAGEONEGEMS__JFROG__IO }}"
jobs:
test:
name: test ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: [ 3.2, 3.1, "3.0", 2.7 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Tests
run: 'bundle exec rspec spec --force-color --format doc'
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/build-')
runs-on: ubuntu-latest
env:
GEMS_PATH: "pkg/*.gem"
RUBYGEMS_HOST: "${{ secrets.RUBYGEMS_HOST }}"
JFROG_USER: "${{ secrets.JFROG_USER }}"
JFROG_PASS: "${{ secrets.JFROG_PASS }}"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Clear any existing packages
run: rm -f $GEMS_PATH
- name: Retrieve credentials
run: |
mkdir -p $HOME/.gem
curl -u $JFROG_USER:$JFROG_PASS $RUBYGEMS_HOST/api/v1/api_key.yaml > $HOME/.gem/credentials
chmod 600 $HOME/.gem/credentials
- name: Build gem
run: bundle exec rake build omniauth-jwt.gemspec
- name: Publish
run: gem push $GEMS_PATH