Skip to content

chore(main): release gotenberg 1.0.1 (#10) #12

chore(main): release gotenberg 1.0.1 (#10)

chore(main): release gotenberg 1.0.1 (#10) #12

name: Release
on:
push:
branches:
- "main" # main only
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: googleapis/release-please-action@v4
id: release
# Checkout code if release was created
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
# Setup ruby if a release was created
- uses: ruby/setup-ruby@v1
with:
# Not needed with a .ruby-version file
ruby-version: 3.2.2
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
if: ${{ steps.release.outputs.release_created }}
- name: Publish to RubyGems
if: ${{ steps.release.outputs.release_created }}
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"