summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-04-24 02:36:35 -0600
committerGitHub <noreply@github.com>2022-04-24 02:36:35 -0600
commit95e7a2f2dbe7635367bcd0cbbae46a6347b45f40 (patch)
tree4b4acbc1d947a71ae8e6a3e87dde05859a899001 /.github
parentfbb10b12c446b3e4bbdeef239c5e148f029de5ce (diff)
resolves #2065 set up fully automated release (PR #2069) [no ci]
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml32
1 files changed, 20 insertions, 12 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bb1cfc61..c6f5bd84 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,17 +1,20 @@
name: Release
on:
- push:
- tags: ['v*']
+ workflow_dispatch:
+ inputs:
+ release-version:
+ description: Enter version to release (e.g., 2.0.1).
+ required: false
jobs:
activate:
- if: github.repository_owner == 'asciidoctor'
runs-on: ubuntu-latest
+ if: github.repository_owner == 'asciidoctor' && github.event_name == 'workflow_dispatch'
steps:
- - name: Proceed
- run: echo ok go
- build:
+ - 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'
@@ -24,19 +27,24 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
+ 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 lint
+ bundle config --local path vendor/bundle
+ bundle config --local without coverage docs
- name: Install dependencies
run: bundle --jobs 3 --retry 3
- name: Run tests
run: bundle exec rake spec
- - name: Publish gem
- uses: dawidd6/action-publish-gem@v1
- with:
- api_key: ${{ secrets.RUBYGEMS_API_KEY }}
+ - name: Run linter
+ run: bundle exec rake lint
+ - name: Setup release environment
+ run: |
+ echo RELEASE_VERSION=${{ github.event.inputs.release-version }} >> $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