Sha256: a85327fc9c41560181ff581287082a907bb682dd69f329b0082474ba3547ee2c

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

name: Publish Gem
on:
  workflow_dispatch:
    inputs:
      release_password:
        description: "Enter Release Password"
        required: true
        default: ""
jobs:
  release:
    runs-on: ubuntu-20.04
    name: Publish Gem
    steps:
      - name: Set ENV
        run: |
          echo "release password: ${{secrets.RELEASE_PASSWORD}}"
          echo "release_password=${{secrets.RELEASE_PASSWORD}}" >> $GITHUB_ENV
      - name: Checkout
        if: github.event.inputs.release_password == env.release_password
        uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        if: github.event.inputs.release_password == env.release_password
        with:
          ruby-version: 3.0
          bundler-cache: true
      - name: Run Rubocop
        if: github.event.inputs.release_password == env.release_password
        run: bundle exec rubocop lib
      - name: Run Test
        if: github.event.inputs.release_password == env.release_password
        run: bundle exec rspec
      - name: Publish
        if: github.event.inputs.release_password == env.release_password
        env:
          RUBYGEMS_AUTH_TOKEN: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          mkdir -p $HOME/.gem
          touch $HOME/.gem/credentials
          chmod 0600 $HOME/.gem/credentials
          printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
          gem build *.gemspec
          gem push *.gem

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mutils-1.2.6 .github/workflows/publish-gem.yml
mutils-1.2.5 .github/workflows/publish-gem.yml