Skip to content

Commit

Permalink
feat: Trigger release workflow on PR merge
Browse files Browse the repository at this point in the history
This change triggers the release workflow when a pull request is merged, rather than on every push. This ensures releases are only created when significant changes have been merged. The release workflow now defaults to a patch bump to ensure minor changes are reflected in the version.
  • Loading branch information
RedAtman committed Jul 20, 2024
1 parent 4c03d70 commit 7f075ae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Create Release and Tag on Merge

on:
push:
# pull_request:
# types: [closed]
# push:
pull_request:
types: [closed]

jobs:
create-release:
# if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'master'
runs-on: ubuntu-latest

steps:
Expand All @@ -19,6 +19,7 @@ jobs:
uses: mathieudutour/[email protected]
with:
tag_prefix: "st4-"
default_bump: patch
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Check release output
Expand Down

0 comments on commit 7f075ae

Please sign in to comment.