Skip to content

Commit

Permalink
chore: fix versioning (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgollucci authored Oct 30, 2024
1 parent f0c78b5 commit 35ef607
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ jobs:
id: bump
run: |
bin/version.bash
if grep -E "^- (major|feat|fix)\!*" dist/changelog.md; then
if grep -E "^- (fix|feat|major)\!*" dist/changelog.md; then
echo "bump=true" >> $GITHUB_OUTPUT
else
echo "bump=false" >> $GITHUB_OUTPUT
fi
- name: Github Release
if: ${{ steps.bump.outputs.bump == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.P6_A_GH_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
Expand Down
8 changes: 3 additions & 5 deletions bin/version.bash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -x
#!/bin/bash

# shellcheck shell=bash

Expand All @@ -24,8 +24,6 @@ main() {
patch=0
elif echo "$log_lines" | grep -q "fix"; then
patch=$((patch + 1))
else
patch=$((patch + 1))
fi

local new_tag="$major.$minor.$patch"
Expand All @@ -34,8 +32,8 @@ main() {
mkdir -p dist/
echo $new_tag >dist/releasetag.txt
echo "$log_lines" >dist/changelog.md
echo "New semantic version tag: $new_tag"
git diff
echo "Semantic version tag: $latest_tag -> $new_tag"
cat dist/changelog.md

return 0
}
Expand Down

0 comments on commit 35ef607

Please sign in to comment.