Bump ruby/setup-ruby from 1.165.1 to 1.173.0 #206
Workflow file for this run
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: Build | |
on: | |
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ for more details. | |
# Using pull_request_target in order to grant dependabot access to run the test action. | |
pull_request_target: | |
branches-ignore: | |
- 'gh-pages' | |
types: [labeled] # for dependabot | |
push: | |
branches-ignore: | |
- 'gh-pages' | |
- 'dependabot/**' | |
workflow_dispatch: | |
branches-ignore: | |
- 'gh-pages' | |
inputs: | |
deploy: | |
description: 'Deploy: [true, false]' | |
required: true | |
default: 'false' | |
# ensure only one workflow per ref | |
# pull_request_target/push events commonly result in duplicate workflows being ran | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'dependencies') | |
|| github.event_name == 'push' | |
|| github.event_name == 'workflow_dispatch' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest # currently ubuntu-22.04 | |
- ubuntu-20.04 | |
- macos-latest # currently macos-12 | |
- macos-11 | |
ruby: | |
- 2.7 | |
- 3.0 | |
- 3.1 | |
- 3.2 | |
- head | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: ruby/[email protected] | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Rubocop | |
run: bin/rake rubocop | |
- name: Rspec tests | |
run: bin/rake spec | |
- name: Yard documents | |
run: bin/rake yard | |
build-deploy-docs: | |
needs: tests | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'dependencies') | |
|| github.event_name == 'push' | |
|| github.event.inputs.deploy == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: ruby/[email protected] | |
with: | |
ruby-version: 3.2 | |
bundler-cache: true | |
- name: Yard documents | |
run: bin/rake yard | |
- name: Deploy pages | |
if: github.ref == 'refs/heads/master' # only push on master branch | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: doc | |
clean: true | |
clean-exclude: | | |
.gitattributes | |
.gitignore | |
LICENSE | |
# release-gem: | |
# needs: tests | |
# if: (github.event_name == 'push' || github.event.inputs.deploy == 'true') | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/[email protected] | |
# with: | |
# persist-credentials: false | |
# - uses: ruby/[email protected] | |
# with: | |
# ruby-version: 3.2 | |
# bundler-cache: true | |
# - name: Release new gem | |
# run: rake release[remote] |