Skip to content

Updated Gemfile

Updated Gemfile #41

Workflow file for this run

name: Build and Checks of Gem Package
on:
push:
branches:
- '*'
- '!master'
jobs:
build_and_checks_for_linux:
name: Build for Linux Environment
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install Dependencies
run: |
gem install bundler
bundle install
- name: Build Gem Package
run: |
gem build middleware_rubygem.gemspec
build_and_checks_for_windows:
name: Build for Windows Environment
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install Dependencies
run: |
gem install bundler
bundle install
- name: Build Gem Package
run: |
gem build middleware_rubygem.gemspec
check-version-change:
name: Check for Version Change
runs-on: ubuntu-latest
needs:
- build_and_checks_for_linux
- build_and_checks_for_windows
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check for Version Change
id: version_check
run: |
# Get the latest version from the main branch
LATEST_VERSION=$(git fetch origin master && git show origin/master:lib/middleware/ruby_gem/version.rb | grep 'VERSION =' | awk '{print $3}' | tr -d '"')
# Get the current version from the current commit
NEW_VERSION=$(git show HEAD:lib/middleware/ruby_gem/version.rb | grep 'VERSION =' | awk '{print $3}' | tr -d '"')
if [ "$LATEST_VERSION" != "$NEW_VERSION" ]; then
echo "Version changed from $LATEST_VERSION to $NEW_VERSION"
else
echo "::warning file=version.rb::Version remains unchanged"
fi