Skip to content

Commit

Permalink
Create a new tag and release when a merge is made to 'powerhrg' branch
Browse files Browse the repository at this point in the history
This will enable us to use Renovate to make sure the gem is always at the latest version, and only release on merges to 'powerhrg' branch
  • Loading branch information
c-gerke committed Nov 29, 2024
1 parent 020c966 commit d7bab15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
branches: [ "powerhrg" ]
paths:
- "lib/krane/version.rb"
pull_request:
branches: [ "powerhrg" ]
paths:
- "lib/krane/version.rb"

jobs:
build:
Expand All @@ -30,16 +26,20 @@ jobs:
VERSION=$(ruby -r './lib/krane/version.rb' -e "puts Krane::VERSION")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create a new tag
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag ${{ env.VERSION }}
git push origin ${{ env.VERSION }}
- name: Build the gem
run: gem build krane.gemspec

- name: Get gem file name
id: get_gem_name
run: echo "GEM_FILE=$(ls krane-*.gem)" >> $GITHUB_ENV

- name: List files for debugging
run: ls -la

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
Expand Down

0 comments on commit d7bab15

Please sign in to comment.