Sha256: 692a477cec74ee2b68d7bc2dc57cc679b5ca782e068246e7d73781cdc637ae16

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 KB

Contents

# .github/workflows/push_gem.yml
name: Push Gem

on:
  workflow_dispatch:
    inputs:
      bump_type:
        type: choice
        description: "Bump Type ( Choosing None will bump build number and keep the same version )"
        default: "patch"
        options:
        - patch
        - minor
        - major


permissions:
  contents: read

jobs:
  push:
    name: Push gem to RubyGems.org
    runs-on: ubuntu-latest

    permissions:
      id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
      contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag

    steps:
      # Set up
      - uses: actions/checkout@v4

      - name: set git config
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
          git config --global user.name "$(gh api /users/${GITHUB_ACTOR} | jq .name -r)"
          git config -l


      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
          ruby-version: ruby

      - name: Install the gem-release
        run: gem install gem-release

      - name: Remove lock on bundle
        run: bundle config set frozen false

      - name: Bump the gem
        run: gem bump ${{ github.events.inputs.bump_type }}

      - name: Commit the new version
        run: git push  

      # Release
      - uses: rubygems/release-gem@v1

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm-admin-1.5.11 .github/workflows/push_gem.yml