Release 2.3.19 #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
run-name: ${{ github.workflow }} ${{ github.event.inputs.release-version }} | |
on: | |
workflow_dispatch: | |
inputs: | |
release-version: | |
description: Enter version to release (e.g., 2.0.1). | |
required: false | |
release-beer: | |
default: TBD | |
description: Enter beer to mark the occasion. | |
required: false | |
jobs: | |
activate: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'asciidoctor' && github.event_name == 'workflow_dispatch' | |
steps: | |
- run: echo ok go | |
perform: | |
needs: activate | |
runs-on: ubuntu-latest | |
environment: releases | |
env: | |
ASCIIDOCTOR_DIAGRAM_VERSION: '~> 2.2' | |
PRAWN_GMAGICK_VERSION: '0.0.9' | |
PYGMENTS_VERSION: '~> 2.0' | |
RGHOST_VERSION: '0.9.7' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: false | |
- name: Install Linux packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install ghostscript poppler-utils libgraphicsmagick1-dev | |
- name: Configure Bundler | |
run: | | |
bundle config --local path .bundle/gems | |
bundle config --local without coverage docs | |
- name: Install dependencies | |
run: bundle --jobs 3 --retry 3 | |
- name: Run tests | |
run: bundle exec rake spec | |
- name: Run linter | |
run: bundle exec rake lint | |
- name: Setup release environment | |
run: | | |
echo ${{ secrets[format('GH_TOKEN_{0}', github.actor)] }} | gh auth login --with-token | |
echo RELEASE_VERSION=${{ github.event.inputs.release-version }} >> $GITHUB_ENV | |
echo RELEASE_BEER=${{ toJSON(github.event.inputs.release-beer) }} >> $GITHUB_ENV | |
echo RELEASE_RUBYGEMS_API_KEY=${{ secrets[format('RUBYGEMS_API_KEY_{0}', github.actor)] }} >> $GITHUB_ENV | |
- name: Build, tag, and publish gem | |
run: ./release.sh |