Drop support for old ERB #199
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: [push, pull_request] | |
jobs: | |
ruby-versions: | |
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }} | |
uses: ruby/actions/.github/workflows/ruby_versions.yml@master | |
with: | |
engine: cruby-truffleruby | |
min_version: 2.6 | |
build: | |
needs: ruby-versions | |
name: build (${{ matrix.ruby }} / ${{ matrix.os }}) | |
strategy: | |
matrix: | |
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} | |
os: [ ubuntu-latest, macos-latest ] | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
steps: | |
- name: git config | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
git config --global advice.detachedHead 0 | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
rubygems: ${{ matrix.ruby < '2.7' && '3.4.22' || '' }} | |
bundler-cache: true | |
- name: Run test | |
run: bundle exec rake compile test | |
- id: build | |
run: | | |
git fetch --force --no-tags origin 'refs/tags/v*:refs/tags/v*' | |
bundle exec rake build | |
echo "pkg=${GITHUB_REPOSITORY#*/}-${RUNNING_OS%-*}" >> $GITHUB_OUTPUT | |
env: | |
RUNNING_OS: ${{matrix.os}} | |
if: ${{ matrix.ruby == fromJson(needs.ruby-versions.outputs.latest) }} | |
shell: bash | |
# Ubuntu 20.04 still has libyaml 0.2.2 | |
- name: Upload package | |
uses: actions/upload-artifact@v4 | |
with: | |
path: pkg/*.gem | |
name: ${{steps.build.outputs.pkg}} | |
if: steps.build.outputs.pkg |