Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.17
current_version = 1.1.19
commit = True
tag = False

Expand Down
104 changes: 101 additions & 3 deletions .github/workflows/version-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ on:
- prod
- main

permissions:
contents: write
pull-requests: write

jobs:
version-controller:
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
REPO_FULL: ${{ github.repository }}
steps:
- name: Checkout Repository
id: checkout_repository
Expand Down Expand Up @@ -98,8 +105,6 @@ jobs:
if: steps.check_arrow.outputs.contains_arrow == 'true'
run: |
git push origin "${{ steps.create_tag.outputs.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Ensure on Current Branch
id: ensure_branch
if: steps.check_arrow.outputs.contains_arrow == 'true'
Expand Down Expand Up @@ -147,5 +152,98 @@ jobs:
TAG_NAME="v${VERSION}"
git tag "$TAG_NAME"
git push origin "$TAG_NAME"
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
- name: Generate Release Notes
id: release_notes
if: github.ref == 'refs/heads/main' && steps.check_arrow.outputs.contains_arrow == 'true'
run: |
TAG="${{ steps.push_tag_to_main.outputs.tag_name }}"
PREV_TAG=$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || echo "")

if [ -z "$PREV_TAG" ]; then
COMMITS=$(git log "$TAG" --pretty=format:"%s")
else
COMMITS=$(git log "${PREV_TAG}..${TAG}" --pretty=format:"%s")
fi

FEATURES=""
FIXES=""
DOCS=""
REFACTORS=""
PERF=""
CHORES=""
STYLES=""
TESTS=""
OTHER=""

while IFS= read -r line; do
case "$line" in
"Bump version:"*|"Merge branch"*|"Merge pull request"*) continue ;;
esac

clean=$(echo "$line" | sed 's/^[^a-zA-Z]* *//')

if echo "$clean" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore)(\([^)]+\))?:'; then
TYPE=$(echo "$clean" | sed -E 's/^(feat|fix|docs|style|refactor|perf|test|chore).*/\1/')
DESC=$(echo "$clean" | sed -E 's/^(feat|fix|docs|style|refactor|perf|test|chore)(\([^)]+\))?:\s*//')
DESC=$(echo "$DESC" | sed -E 's/\s*\[(minor|major|patch) candidate\]\s*$//')
SCOPE=$(echo "$clean" | sed -nE 's/^[a-z]+\(([^)]+)\):.*/\1/p')

if [ -n "$SCOPE" ]; then
ENTRY="- **${SCOPE}**: ${DESC}"
else
ENTRY="- ${DESC}"
fi

case "$TYPE" in
feat) FEATURES="${FEATURES}${ENTRY}\n" ;;
fix) FIXES="${FIXES}${ENTRY}\n" ;;
docs) DOCS="${DOCS}${ENTRY}\n" ;;
style) STYLES="${STYLES}${ENTRY}\n" ;;
refactor) REFACTORS="${REFACTORS}${ENTRY}\n" ;;
perf) PERF="${PERF}${ENTRY}\n" ;;
test) TESTS="${TESTS}${ENTRY}\n" ;;
chore) CHORES="${CHORES}${ENTRY}\n" ;;
esac
else
if [ -n "$clean" ]; then
OTHER="${OTHER}- ${clean}\n"
fi
fi
done <<< "$COMMITS"

BODY="## What's Changed\n\n"

[ -n "$FEATURES" ] && BODY="${BODY}### Features\n${FEATURES}\n"
[ -n "$FIXES" ] && BODY="${BODY}### Bug Fixes\n${FIXES}\n"
[ -n "$DOCS" ] && BODY="${BODY}### Documentation\n${DOCS}\n"
[ -n "$REFACTORS" ] && BODY="${BODY}### Refactors\n${REFACTORS}\n"
[ -n "$PERF" ] && BODY="${BODY}### Performance\n${PERF}\n"
[ -n "$STYLES" ] && BODY="${BODY}### Styles\n${STYLES}\n"
[ -n "$TESTS" ] && BODY="${BODY}### Tests\n${TESTS}\n"
[ -n "$CHORES" ] && BODY="${BODY}### Chores\n${CHORES}\n"
[ -n "$OTHER" ] && BODY="${BODY}### Other\n${OTHER}\n"

if [ -n "$PREV_TAG" ]; then
BODY="${BODY}**Full Changelog**: https://github.com/${REPO_FULL}/compare/${PREV_TAG}...${TAG}\n"
fi

{
echo "body<<RELEASE_NOTES_EOF"
echo -e "$BODY"
echo "RELEASE_NOTES_EOF"
} >> "$GITHUB_OUTPUT"
env:
REPO_FULL: ${{ env.REPO_FULL }}
- name: Create GitHub Release
id: create_release
if: github.ref == 'refs/heads/main' && steps.check_arrow.outputs.contains_arrow == 'true'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.push_tag_to_main.outputs.tag_name }}
name: Release ${{ steps.push_tag_to_main.outputs.tag_name }}
body: ${{ steps.release_notes.outputs.body }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [1.1.17] - 2026-03-03

### Bug Fixes

- **core**: use access token for tag push to trigger release workflow (`patch candidate`)

### Documentation

- **core**: update changelog

## [1.1.16] - 2026-03-03

### Features
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "scripts"
version = "1.1.17"
version = "1.1.19"
description = "CICD Core Scripts"
authors = ["B <g46327wsj1.marbling129@passinbox.com>"]
license = "GLPv3"
Expand Down