Skip to content

Commit

Permalink
Merge pull request #13 from karna256/staging
Browse files Browse the repository at this point in the history
fix: Staging
  • Loading branch information
karna256 authored Aug 18, 2024
2 parents 1f270ca + 647c408 commit f413df6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Semver Workflow

on:
pull_request:
types: [opened, synchronize, closed]
types: [closed]
branches: [main, qa, staging]

permissions:
Expand Down Expand Up @@ -49,9 +49,9 @@ jobs:
last_version=$(git tag --sort=-version:refname | grep -P "^$package_name@v\d+.\d+.\d+$" | head -n 1 | cut -d v -f 2)
if [ -z "$last_version" ]; then
new_version=1.0.0
elif [[ ${{ github.head_ref }} =~ ^"major" ]]; then
elif [[ "${{ github.event.pull_request.title }}" =~ ^"major" ]]; then
new_version=$(semver bump major "$last_version")
elif [[ ${{ github.head_ref }} =~ ^"feat" ]]; then
elif [[ "${{ github.event.pull_request.title }}" =~ ^"feat" ]]; then
new_version=$(semver bump minor "$last_version")
else
new_version=$(semver bump patch "$last_version")
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Push Tag
if: github.event.pull_request.merged
id: tag_version
uses: mathieudutour/github-tag-action@v5.6
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.tag_version }}
Expand All @@ -82,3 +82,4 @@ jobs:
prerelease: false
title: ${{ env.tag_version }}
automatic_release_tag: ${{ env.tag_version }}

2 changes: 1 addition & 1 deletion test.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<title>Title</title>
</head>
<body>
Initial version
third version of the file A new feature
</body>
</html>

0 comments on commit f413df6

Please sign in to comment.