Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
03add717be | |||
01986944f0
|
|||
c25b2e9cd5
|
|||
f44f457e6b | |||
169d9ec4db
|
|||
cbcd5e2ab7
|
|||
ef3ac462ba | |||
d27a0cbd80
|
|||
1d9659b6df
|
|||
40ca5c987d | |||
d8700af97d
|
|||
856565d87f
|
24
CHANGELOG.md
24
CHANGELOG.md
@@ -2,6 +2,30 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [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
|
||||
|
||||
- Integrate gha-timer for step timing - ([856565d](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/856565d87f2575d6883705ddde3d177555c1bd86))
|
||||
|
||||
## [0.3.5](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.3.4..v0.3.5) - 2025-06-29
|
||||
|
||||
### 🚀 Features
|
||||
|
21
action.yml
21
action.yml
@@ -14,12 +14,14 @@ 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"
|
||||
steps:
|
||||
- uses: fulcrumgenomics/gha-timer@v1
|
||||
|
||||
- name: Detect version change
|
||||
shell: bash
|
||||
id: detect
|
||||
@@ -27,18 +29,9 @@ 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: |
|
||||
gha-timer start --name "Detect Version Change"
|
||||
|
||||
${{ github.action_path }}/scripts/detect-version-change.sh
|
||||
exit_code=$?
|
||||
|
||||
if [[ $exit_code -eq 0 ]]; then
|
||||
gha-timer elapsed --outcome success --name "Detect Version Change"
|
||||
else
|
||||
gha-timer elapsed --outcome failure --name "Detect Version Change"
|
||||
exit $exit_code
|
||||
fi
|
||||
|
||||
- name: Read CLIFF_VERSION
|
||||
shell: bash
|
||||
@@ -59,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 || '' }}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user