Skip to content

Merge pull request #3 from ccorn90/ccorn90/rubyopt #7

Merge pull request #3 from ccorn90/ccorn90/rubyopt

Merge pull request #3 from ccorn90/ccorn90/rubyopt #7

name: Build and Release Gem on windows
on:
push:
tags:
- '*'
jobs:
build-and-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler-cache: true
- name: Build Gem
run: |
rake build_stub
gem build
- name: Get Gem File Name
id: gem_file_name
run: |
$filename = (Get-ChildItem -Filter "*.gem").Name
echo "filename=$filename" >> $env:GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Gem
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.gem_file_name.outputs.filename }}
asset_name: ${{ steps.gem_file_name.outputs.filename }}
asset_content_type: application/octet-stream