diff --git a/.github/workflows/publish_to_rubygems.yml b/.github/workflows/bump_version_and_push_to_rubygems.yml similarity index 53% rename from .github/workflows/publish_to_rubygems.yml rename to .github/workflows/bump_version_and_push_to_rubygems.yml index affe7de..fba4c11 100644 --- a/.github/workflows/publish_to_rubygems.yml +++ b/.github/workflows/bump_version_and_push_to_rubygems.yml @@ -1,7 +1,20 @@ -name: Publish to RubyGems +name: Bump version and Push to RubyGems on: workflow_dispatch: + inputs: + miner-or-major: + description: 'Minor or major release' + required: true + default: 'minor' + options: + - 'minor' + - 'major' + email: + description: Your email + required: true + type: string + jobs: build: @@ -17,7 +30,17 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 + - run: bundle install + - run: gem install gem-release + + - name: config + run: | + git config --global user.email ${{ github.event.inputs.email }} + git config --global user.name ${{ github.actor }} + + - name: Bump version + run: gem bump --version ${{ github.event.inputs.miner-or-major }} - name: Publish to RubyGems run: |