Skip to content

Commit

Permalink
Merge pull request #34 from theablefew/feature/update_release_workflow
Browse files Browse the repository at this point in the history
Update release workflow
  • Loading branch information
esmarkowski authored Mar 7, 2024
2 parents 1924132 + f9b569a commit 40d3356
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: Release Gem

on:
push:
branches:
- main
tags:
- 'v*'
paths:
pull_request:
types: [closed]
paths:
- 'lib/stretchy/version.rb'

branches:
- main

jobs:
# spec:
# uses: ./.github/workflows/spec.yml

build:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
# needs: spec

steps:
- uses: actions/checkout@v4

- name: Publish gem
if: contains(github.ref, 'refs/tags/v')
uses: cadwallion/publish-rubygems-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def commit_and_push_changes(new_version, branch_name)
system("git add lib/stretchy/version.rb")
system("git commit -m 'Bump version to v#{new_version}'")
system("git tag v#{new_version}")
system("git push origin #{branch_name} --tags")
system("git push origin #{branch_name} --tags -f")
end

def create_pull_request(new_version, base_branch, branch_name)
Expand Down

0 comments on commit 40d3356

Please sign in to comment.