Skip to content

Update build.yml

Update build.yml #11

Workflow file for this run

name: Build Windows Binary
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
# Check out the repository
- uses: actions/checkout@v4
# Set up Ruby environment
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'head'
# Install dependencies defined in Gemfile
- name: Install dependencies
shell: bash
run: |
if [ -f Gemfile ]; then
bundle install
else
echo "No Gemfile found, skipping bundle install."
fi
- name: Install ocra & fiber
run: gem install ocra fiber
# Build the binary using ocra
- name: Build Binary
shell: bash
run: |
if [ -f orconverter.rb ]; then
if gem contents fiber > /dev/null 2>&1; then
fiber_path=$(gem contents fiber | grep fiber.so)
ocra orconverter.rb --no-autoload --gem-all --dll "$fiber_path"
else
echo "fiber.so not found."
exit 1
fi
else
echo "Script 'orconverter.rb' not found. Please check the file path."
exit 1
fi
# Upload the binary as an artifact
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: ORConverter
path: ./orconverter.exe