arturictus/sidekiq_alive

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release

on:
  workflow_dispatch:
    inputs:
      version:
        description: Release version
        required: true
        type: string

jobs:
  release:
    name: Ruby gem
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          ssh-key: ${{ secrets.RELEASE_SSH_KEY }}
      -
        name: Set up Ruby 3.1
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      -
        name: Update version
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          bundle config unset deployment
          bundle exec rake "version[${{ inputs.version }}]" && git push
      -
        name: Create tag and push to rubygems
        run: bundle exec rake release
        env:
          GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}