SG-31320 Add SECURITY.md file #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify version change | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
version_change: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch main branch | |
run: git fetch origin main:main | |
- name: Verify if there's a change in version | |
run: 'git diff main -- lib/shotgrid_api_ruby/version.rb | grep VERSION' | |
- name: Print new version | |
run: 'git diff main -- lib/shotgrid_api_ruby/version.rb | grep -E "^\+.*VERSION" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?"' | |
- name: Verify if higher version | |
run: '[[ $(git diff main -- lib/shotgrid_api_ruby/version.rb | grep -E "^\+.*VERSION" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?") > $(git diff main -- lib/shotgrid_api_ruby/version.rb | grep -E "^-.*VERSION" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?") ]]' |