Skip to content

release

release #3

Workflow file for this run

name: Publish and Release Gem
on:
push:
branches: [ $default-branch ]
paths: [ "VERSION" ]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Setup Ruby
uses: ruby/setup-ruby@8a45918450651f5e4784b6031db26f4b9f76b251
with:
bundler-cache: true
- name: Run Tests
run: script/test
- name: Build Gem
run: |
echo "GEM_VERSION=$(gem build entitlements-gitrepo-auditor-plugin.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV
- name: Publish to GitHub Packages
run: |
GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/github entitlements-gitrepo-auditor-plugin-${{ env.GEM_VERSION }}.gem