Skip to content

Set GEM_PATH

Set GEM_PATH #191

Workflow file for this run

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: [ mingw, mswin ]
os: [ windows-latest ]
fail-fast: false

Check failure on line 20 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 20, Col: 5): Unexpected value 'fail-fast'
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
- run: echo GEM_PATH=./vendor/bundle >> $GITHUB_ENV
- name: Run test
run: rake compile test
- id: build
run: |
git fetch --force --no-tags origin 'refs/tags/v*:refs/tags/v*'
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