From ae3adfb0ccb75a31bb6402f80616a8940368e424 Mon Sep 17 00:00:00 2001 From: Cloud Agent Date: Tue, 3 Mar 2026 03:15:59 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E2=9C=A8=20feat(core):=20add=20inline=20re?= =?UTF-8?q?lease=20creation=20to=20version=20controller=20[patch=20candida?= =?UTF-8?q?te]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/version-controller.yml | 103 ++++++++++++++++++++++- CHANGELOG.md | 10 +++ 2 files changed, 110 insertions(+), 3 deletions(-) diff --git a/.github/workflows/version-controller.yml b/.github/workflows/version-controller.yml index 80f3a0d..37d8f75 100644 --- a/.github/workflows/version-controller.yml +++ b/.github/workflows/version-controller.yml @@ -11,9 +11,15 @@ on: - prod - main +permissions: + contents: 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 @@ -98,8 +104,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' @@ -147,5 +151,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<> "$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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e1e48c..a82aaf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 From 4a8fe71116ef513938e824f1c78db0346859c6a8 Mon Sep 17 00:00:00 2001 From: Cloud Agent Date: Tue, 3 Mar 2026 03:16:52 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=96=20Bump=20version:=201.1.17=20?= =?UTF-8?q?=E2=86=92=201.1.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4f0dcc9..8816a59 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.1.17 +current_version = 1.1.18 commit = True tag = False diff --git a/pyproject.toml b/pyproject.toml index ef72022..6ddf518 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "1.1.17" +version = "1.1.18" description = "CICD Core Scripts" authors = ["B "] license = "GLPv3" From 8e78c203fa392421dc6d1263f6d5951ca13ca47b Mon Sep 17 00:00:00 2001 From: Cloud Agent Date: Tue, 3 Mar 2026 03:20:09 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20fix(core):=20add=20pull-requ?= =?UTF-8?q?ests=20write=20permission=20to=20version=20controller=20[patch?= =?UTF-8?q?=20candidate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/version-controller.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/version-controller.yml b/.github/workflows/version-controller.yml index 37d8f75..816b1d6 100644 --- a/.github/workflows/version-controller.yml +++ b/.github/workflows/version-controller.yml @@ -13,6 +13,7 @@ on: permissions: contents: write + pull-requests: write jobs: version-controller: From 52a92b0bc359ad783a9d9f5d62d02c626d7f536c Mon Sep 17 00:00:00 2001 From: Cloud Agent Date: Tue, 3 Mar 2026 03:20:29 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=96=20Bump=20version:=201.1.18=20?= =?UTF-8?q?=E2=86=92=201.1.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8816a59..68536e2 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.1.18 +current_version = 1.1.19 commit = True tag = False diff --git a/pyproject.toml b/pyproject.toml index 6ddf518..6368976 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "scripts" -version = "1.1.18" +version = "1.1.19" description = "CICD Core Scripts" authors = ["B "] license = "GLPv3"