Release 1.1.0 #30
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., 1.0.1). | |
required: false | |
jobs: | |
perform: | |
if: github.repository_owner == 'asciidoctor' && github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
environment: releases | |
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 Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install Ruby dependencies | |
run: | | |
bundle config --local path vendor/bundle | |
bundle config --local without coverage docs | |
bundle --jobs 3 --retry 3 | |
- name: Run linter | |
run: bundle exec rake lint | |
- name: Run tests | |
run: bundle exec rake spec | |
- name: Set up release environment | |
run: | | |
echo RELEASE_VERSION=${{ github.event.inputs.release-version }} >> $GITHUB_ENV | |
echo RELEASE_NPM_TOKEN=${{ secrets[format('NPM_TOKEN_{0}', github.actor)] }} >> $GITHUB_ENV | |
echo RELEASE_RUBYGEMS_API_KEY=${{ secrets[format('RUBYGEMS_API_KEY_{0}', github.actor)] }} >> $GITHUB_ENV | |
- name: Build, tag, and publish packages | |
run: ./release.sh |