summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: f6790047b807e735931fb24c1f7fbd08852e1690 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Release
on:
  push:
    tags:
    - 'v*'
jobs:
  activate:
    if: github.repository == 'asciidoctor/asciidoctor-pdf'
    runs-on: ubuntu-latest
    steps:
    - run: echo ok go
  build:
    needs: activate
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Install Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: '2.7'
    - name: Configure Bundler
      run: |
        bundle config --local path .bundle/gems
        bundle config --local without coverage docs lint
    - 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 }}