summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
blob: b73f0c0b282a6eec19b7e99d8afe77b15e8f598d (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
34
35
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
      with:
        fetch-depth: 5
    - 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 }}