Skip to content

Merge pull request #27 from nobu/arg_as #94

Merge pull request #27 from nobu/arg_as

Merge pull request #27 from nobu/arg_as #94

Workflow file for this run

name: windows
on: [push, pull_request]
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.6
versions: '["mswin", "mingw"]'
test:
needs: ruby-versions
name: build (${{ matrix.ruby }})
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
runs-on: windows-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
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run test
run: bundle exec rake
- id: build
run: |
bundle exec rake build
echo "pkg=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
if: >-
${{
github.event_name == 'push' &&
(matrix.ruby == needs.ruby-versions.outputs.latest)
}}
shell: bash
- name: Upload package
uses: actions/upload-artifact@v4
with:
path: pkg/*.gem
name: ${{steps.build.outputs.pkg}}
if: steps.build.outputs.pkg