Add semantic release support #64
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: Check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
test: | |
name: Test (Ruby ${{ matrix.ruby }} on ${{ matrix.os_name }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
ruby: | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
include: | |
- os: ubuntu-latest | |
os_name: Linux | |
- os: macos-latest | |
os_name: macOS | |
- os: windows-latest | |
os_name: Windows | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
ruby_version: ${{ matrix.ruby }} | |
- name: Test | |
run: bundle exec rake test | |
lint: | |
name: Lint (Ruby ${{ matrix.ruby }}) | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
ruby_version: ${{ matrix.ruby }} | |
- name: Lint | |
run: bundle exec rake lint | |
build: | |
name: Build | |
uses: ./.github/workflows/_build.yml | |
install: | |
name: Install (Ruby ${{ matrix.ruby }} on ${{ matrix.os_name }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
ruby: | |
- '3.1' | |
- '3.2' | |
- '3.3' | |
include: | |
- os: ubuntu-latest | |
os_name: Linux | |
- os: macos-latest | |
os_name: macOS | |
- os: windows-latest | |
os_name: Windows | |
steps: | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build.outputs.artifact_name }} | |
path: . | |
- name: Find gems | |
uses: tj-actions/glob@v21 | |
id: gems | |
with: | |
files: '*.gem' | |
- name: Create main.rb | |
uses: DamianReeves/[email protected] | |
with: | |
write-mode: overwrite | |
path: main.rb | |
contents: | | |
require 'makenew-rbgem' | |
- name: Install | |
run: gem install ${{ steps.gems.outputs.paths }} | |
- name: Run | |
run: ruby main.rb |