Skip to content

Set the credentials for a new version release #30

Set the credentials for a new version release

Set the credentials for a new version release #30

Workflow file for this run

name: release
on:
pull_request:
branches:
- main
types:
- closed
jobs:
release-please:
permissions: write-all
runs-on: ubuntu-latest
if: >-
${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'skip-version-bump') }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
- run: bundle install
# Publish
- name: publish gem
env:
RUBYGEMS_TOKEN: secrets.RUBYGEMS_TOKEN
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_TOKEN}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem