12 Commits
v0.3.6 ... main

Author SHA1 Message Date
313ace34fe chore(changelog): update changelog for v0.4.3
All checks were successful
Create Major Version Tag / update-major-tag (release) Successful in 5s
2025-06-29 12:18:09 +00:00
df2ba3b060 chore(version): bump version to 0.4.3
All checks were successful
Auto Changelog & Release / release (push) Successful in 8s
2025-06-29 14:18:02 +02:00
27ee1746db fix(script): use dynamic branch name for git push 2025-06-29 14:18:02 +02:00
03add717be chore(changelog): update changelog for v0.4.2
All checks were successful
Create Major Version Tag / update-major-tag (release) Successful in 4s
2025-06-29 12:13:42 +00:00
01986944f0 chore(version): bump version to 0.4.2
All checks were successful
Auto Changelog & Release / release (push) Successful in 8s
2025-06-29 14:13:34 +02:00
c25b2e9cd5 fix(action): update conditions for version detection
- Remove branch-specific checks from conditional statements
- Simplify logic for changelog generation and release steps
- Ensure consistent behavior regardless of branch context
2025-06-29 14:13:34 +02:00
f44f457e6b chore(changelog): update changelog for v0.4.1
All checks were successful
Create Major Version Tag / update-major-tag (release) Successful in 4s
2025-06-29 12:11:27 +00:00
169d9ec4db chore(version): bump to 0.4.1
All checks were successful
Auto Changelog & Release / release (push) Successful in 7s
2025-06-29 14:11:17 +02:00
cbcd5e2ab7 fix(action): standardize input key naming
- Update input key from `allow-non-main-release` to `allow_non_main_release`
- Ensure consistency with environment variable naming convention
2025-06-29 14:11:17 +02:00
ef3ac462ba chore(changelog): update changelog for v0.4.0
All checks were successful
Create Major Version Tag / update-major-tag (release) Successful in 4s
2025-06-29 12:10:01 +00:00
d27a0cbd80 chore(version): bump version to 0.4.0
All checks were successful
Auto Changelog & Release / release (push) Successful in 7s
2025-06-29 14:09:47 +02:00
1d9659b6df feat(action): add support for non-main branch releases
- Introduce an input to allow releases from non-main branches
- Update logic to conditionally permit version checks outside 'main'
2025-06-29 14:09:24 +02:00
5 changed files with 39 additions and 6 deletions

View File

@@ -2,6 +2,30 @@
All notable changes to this project will be documented in this file.
## [0.4.3](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.2..v0.4.3) - 2025-06-29
### 🐛 Bug Fixes
- *(script)* Use dynamic branch name for git push - ([27ee174](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/27ee1746dbc7b2c6c1564a04c024337ff158a9c5))
## [0.4.2](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.1..v0.4.2) - 2025-06-29
### 🐛 Bug Fixes
- *(action)* Update conditions for version detection - ([c25b2e9](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/c25b2e9cd551e923b84cd144b818940fd5e1ccff))
## [0.4.1](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.0..v0.4.1) - 2025-06-29
### 🐛 Bug Fixes
- *(action)* Standardize input key naming - ([cbcd5e2](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/cbcd5e2ab7e7f2498021d5043da9999f62dcf44d))
## [0.4.0](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.3.6..v0.4.0) - 2025-06-29
### 🚀 Features
- *(action)* Add support for non-main branch releases - ([1d9659b](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/1d9659b6df0d63ed17432e677ee77a4c17d2f2f3))
## [0.3.6](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.3.5..v0.3.6) - 2025-06-29
### ◀️ Revert

View File

@@ -1 +1 @@
0.3.6
0.4.3

View File

@@ -14,6 +14,10 @@ inputs:
description: "Commit-Autore-Mail"
required: false
default: ""
allow_non_main_release:
description: "Allow publishing releases from branches other than 'main'."
required: false
default: "false"
runs:
using: "composite"
@@ -25,6 +29,7 @@ runs:
GITHUB_EVENT_BEFORE: ${{ github.event.before || '' }}
GITHUB_SHA: ${{ github.sha || '' }}
GITHUB_REF: ${{ github.ref || '' }}
ALLOW_NON_MAIN_RELEASE: ${{ inputs.allow_non_main_release }}
run: |
${{ github.action_path }}/scripts/detect-version-change.sh
@@ -47,13 +52,13 @@ runs:
"${{ inputs.author_email }}"
- name: Generate and commit changelog (unreleased)
if: steps.detect.outputs.version_changed == 'false' || github.ref != 'refs/heads/main'
if: steps.detect.outputs.version_changed == 'false'
shell: bash
run: |
${{ github.action_path }}/scripts/generate-unreleased-changelog.sh
- name: Release from VERSION
if: steps.detect.outputs.version_changed == 'true' && github.ref == 'refs/heads/main'
if: steps.detect.outputs.version_changed == 'true'
shell: bash
env:
RELEASE_PUBLISH_TOKEN: ${{ inputs.token || '' }}

View File

@@ -6,14 +6,17 @@ GIT_REF="${GITHUB_REF:-}"
COMMIT_BEFORE="${GITHUB_EVENT_BEFORE:-}"
COMMIT_AFTER="${GITHUB_SHA:-}"
VERSION_FILE="VERSION"
ALLOW_NON_MAIN_RELEASE="${ALLOW_NON_MAIN_RELEASE:-false}"
echo "🔍 Comparing commits:"
echo "Before: $COMMIT_BEFORE"
echo "After: $COMMIT_AFTER"
echo "Ref: $GIT_REF"
echo "Allow release from non-main branches: $ALLOW_NON_MAIN_RELEASE"
# Check branch condition
if [[ "$GIT_REF" != "refs/heads/main" ]]; then
echo "Not on 'main' branch – skipping version check."
if [[ "$ALLOW_NON_MAIN_RELEASE" != "true" && "$GIT_REF" != "refs/heads/main" ]]; then
echo "🚫 Not on 'main' branch and non-main releases are disabled – skipping version check."
echo "version_changed=false" >> "$GITHUB_OUTPUT"
exit 0
fi

View File

@@ -52,6 +52,7 @@ VERSION_FILE="VERSION"
CHANGELOG_FILE="CHANGELOG.md"
CLIFF_CONFIG="cliff.toml"
RELEASE_BODY_TMP="$(mktemp)"
GIT_BRANCH="${GITHUB_REF##refs/heads/}"
# === Step 1: Read version ===
if [[ ! -f "$VERSION_FILE" ]]; then
@@ -87,7 +88,7 @@ if git diff --cached --quiet; then
else
echo "📝 Committing updated changelog"
git commit -m "chore(changelog): update changelog for v$VERSION"
git push origin main
git push origin "$GIT_BRANCH"
fi
# === Step 4: Create tag if necessary ===