Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bd419d38f | |||
|
a6ee83e109
|
|||
| 3e6b722501 | |||
|
fedcc1ff41
|
|||
| 399f0edb40 | |||
|
73a1b5cc24
|
|||
| ddda682c80 | |||
|
121ea5b57a
|
|||
| 4d248aefd1 | |||
|
8de8b47038
|
56
CHANGELOG.md
56
CHANGELOG.md
@@ -2,64 +2,20 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [2.0.9](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.8..v2.0.9) - 2025-07-04
|
## [1.0.0](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.3..v1.0.0) - 2025-09-27
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
|
||||||
- *(exec)* Add support for custom working directories - ([7892a1f](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/7892a1fa7c2451ea947c11f0cf71ba189306d708))
|
- *(ci)* [**breaking**] Enhance changelog generation with context augmentation - ([8de8b47](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/8de8b470386cf9f21cec660ba71d840ea6786231))
|
||||||
|
|
||||||
## [2.0.8](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.7..v2.0.8) - 2025-07-04
|
|
||||||
|
|
||||||
### 🚀 Features
|
|
||||||
|
|
||||||
- *(scripts)* Add release flag to version change checks - ([967e4ac](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/967e4ac3014fe9273edc81e40e00a8acb324d294))
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- *(scripts)* Remove redundant newline in output - ([f512d3f](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/f512d3ff6da44a83da279cf32484497bf3cc8f22))
|
- *(release)* Fix changelog generation pipe usage - ([fedcc1f](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/fedcc1ff41b9535f5002d046427dd640b647bde4))
|
||||||
|
|
||||||
## [2.0.7](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.6..v2.0.7) - 2025-07-04
|
### ⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
- *(release)* Update action version in workflow - ([73a1b5c](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/73a1b5cc243248b50275b2368a4cd92bbb4a1a8e))
|
||||||
|
- *(ci)* Allow non-main branch releases - ([121ea5b](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/121ea5b57a587626a036738c23e2983380470dd7))
|
||||||
- *(path)* Correct script directory resolution - ([0a562d4](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/0a562d4e029193c4e39926d1ff220a6a37a6e049))
|
|
||||||
|
|
||||||
## [2.0.6](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.5..v2.0.6) - 2025-07-04
|
|
||||||
|
|
||||||
### 🚜 Refactor
|
|
||||||
|
|
||||||
- *(scripts)* Simplify path management and command execution - ([18b493d](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/18b493d524630e8da304e2a8ec098415fa9140e1))
|
|
||||||
|
|
||||||
## [2.0.5](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.4..v2.0.5) - 2025-07-04
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
|
||||||
|
|
||||||
- *(script)* Correct path formatting in version detection script - ([a753d6a](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/a753d6aa3b45d4dab36e4ef56bbc71046eb032c9))
|
|
||||||
|
|
||||||
## [2.0.4](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.3..v2.0.4) - 2025-07-04
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
|
||||||
|
|
||||||
- *(main)* Update script path to ensure correct resolution - ([df27af7](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/df27af76add1dc4b50ead8015976b5e96b177661))
|
|
||||||
|
|
||||||
## [2.0.3](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.2..v2.0.3) - 2025-07-04
|
|
||||||
|
|
||||||
### 🚜 Refactor
|
|
||||||
|
|
||||||
- *(action)* Simplify composite action structure - ([8df31fb](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/8df31fb97ebd73e71b2f8a9dc925fe8a81192be3))
|
|
||||||
|
|
||||||
## [2.0.2](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v2.0.1..v2.0.2) - 2025-07-04
|
|
||||||
|
|
||||||
### 🚜 Refactor
|
|
||||||
|
|
||||||
- *(actions)* Simplify action path structure - ([30f83b0](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/30f83b08eecabe17b7d1f53aaf0bb4d0cdd82256))
|
|
||||||
|
|
||||||
## [2.0.1](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.3..v2.0.1) - 2025-07-04
|
|
||||||
|
|
||||||
### 🚀 Features
|
|
||||||
|
|
||||||
- *(workflows)* Allow non-main branch releases - ([09e4174](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/09e41744fbf920c0253e13644cb38f1dd430c0f3))
|
|
||||||
- *(actions)* Add post-step support for composite actions - ([543b311](https://git.0xmax42.io/actions/auto-changelog-release-action/commit/543b311d1eb1fb83e8e0ef4014c549e61a863038))
|
|
||||||
|
|
||||||
## [0.4.3](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.2..v0.4.3) - 2025-06-29
|
## [0.4.3](https://git.0xmax42.io/actions/auto-changelog-release-action/compare/v0.4.2..v0.4.3) - 2025-06-29
|
||||||
|
|
||||||
|
|||||||
58
action.yml
58
action.yml
@@ -1,5 +1,5 @@
|
|||||||
name: Auto Changelog & Release
|
name: Auto Changelog & Release
|
||||||
description: One-stop composite action
|
description: "One-stop composite action for version-bump detection, changelog generation and Gitea release."
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
token:
|
token:
|
||||||
@@ -19,11 +19,53 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
|
||||||
outputs:
|
|
||||||
release:
|
|
||||||
description: "Whether a release should be made (true/false)"
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "node20"
|
using: "composite"
|
||||||
main: "dist/main.js"
|
steps:
|
||||||
post: "dist/post.js"
|
- name: Detect version change
|
||||||
|
shell: bash
|
||||||
|
id: detect
|
||||||
|
env:
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Read CLIFF_VERSION
|
||||||
|
shell: bash
|
||||||
|
id: cliff_version
|
||||||
|
run: |
|
||||||
|
${{ github.action_path }}/scripts/read-cliff-version.sh
|
||||||
|
|
||||||
|
- name: Install git-cliff
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
${{ github.action_path }}/scripts/install-git-cliff.sh "${{ steps.cliff_version.outputs.version }}"
|
||||||
|
|
||||||
|
- name: Install Python
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
${{ github.action_path }}/scripts/install-python.sh
|
||||||
|
|
||||||
|
- name: Set up git
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
${{ github.action_path }}/scripts/setup-git.sh \
|
||||||
|
"${{ inputs.author_name }}" \
|
||||||
|
"${{ inputs.author_email }}"
|
||||||
|
|
||||||
|
- name: Generate and commit changelog (unreleased)
|
||||||
|
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'
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
RELEASE_PUBLISH_TOKEN: ${{ inputs.token || '' }}
|
||||||
|
run: |
|
||||||
|
${{ github.action_path }}/scripts/release-from-version.sh
|
||||||
|
|||||||
25
cliff.toml
25
cliff.toml
@@ -1,4 +1,4 @@
|
|||||||
# CLIFF_VERSION=2.8.0
|
# CLIFF_VERSION=2.10.1
|
||||||
# git-cliff ~ default configuration file
|
# git-cliff ~ default configuration file
|
||||||
# https://git-cliff.org/docs/configuration
|
# https://git-cliff.org/docs/configuration
|
||||||
#
|
#
|
||||||
@@ -10,18 +10,15 @@ owner = "actions"
|
|||||||
repo = "auto-changelog-release-action"
|
repo = "auto-changelog-release-action"
|
||||||
|
|
||||||
[changelog]
|
[changelog]
|
||||||
# postprocessors
|
|
||||||
postprocessors = [
|
postprocessors = [
|
||||||
{ pattern = '<GITEA_URL>', replace = "https://git.0xmax42.io" }, # replace gitea url
|
{ pattern = '<GITEA_URL>', replace = "https://git.0xmax42.io" }, # replace gitea url
|
||||||
]
|
]
|
||||||
|
|
||||||
# template for the changelog header
|
|
||||||
header = """
|
header = """
|
||||||
# Changelog\n
|
# Changelog\n
|
||||||
All notable changes to this project will be documented in this file.\n
|
All notable changes to this project will be documented in this file.\n
|
||||||
"""
|
"""
|
||||||
# template for the changelog body
|
|
||||||
# https://keats.github.io/tera/docs/#introduction
|
|
||||||
body = """
|
body = """
|
||||||
{%- macro remote_url() -%}
|
{%- macro remote_url() -%}
|
||||||
<GITEA_URL>/{{ remote.gitea.owner }}/{{ remote.gitea.repo }}
|
<GITEA_URL>/{{ remote.gitea.owner }}/{{ remote.gitea.repo }}
|
||||||
@@ -38,16 +35,26 @@ body = """
|
|||||||
## [unreleased]
|
## [unreleased]
|
||||||
{% endif %}\
|
{% endif %}\
|
||||||
{% for group, commits in commits | group_by(attribute="group") %}
|
{% for group, commits in commits | group_by(attribute="group") %}
|
||||||
### {{ group | striptags | trim | upper_first }}
|
### {{ group | striptags | trim | upper_first }}\n
|
||||||
{% for commit in commits %}
|
{% for commit in commits %}\
|
||||||
|
{% if commit.merge_commit %}\
|
||||||
|
- 🔀 **{{ commit.message | upper_first }}** - \
|
||||||
|
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||||
|
{% for child in commit.extra.children %}
|
||||||
|
{{ " " | safe }}- {% if child.scope %}*({{ child.scope }})* {% endif %}\
|
||||||
|
{% if child.breaking %}[**breaking**] {% endif %}\
|
||||||
|
{{ child.message | upper_first }} - \
|
||||||
|
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
||||||
|
{% endfor %}\
|
||||||
|
{% else %}\
|
||||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||||
{% if commit.breaking %}[**breaking**] {% endif %}\
|
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||||
{{ commit.message | upper_first }} - \
|
{{ commit.message | upper_first }} - \
|
||||||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
{% endfor %}\
|
||||||
{% endfor %}\n
|
{% endfor %}\n
|
||||||
"""
|
"""
|
||||||
# template for the changelog footer
|
|
||||||
footer = """
|
footer = """
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
38
dist/main.js
vendored
38
dist/main.js
vendored
@@ -1,38 +0,0 @@
|
|||||||
const cp = require("child_process");
|
|
||||||
const path = require("path");
|
|
||||||
const fs = require("fs");
|
|
||||||
|
|
||||||
function run(script) {
|
|
||||||
cp.execFileSync(script, {
|
|
||||||
stdio: "inherit",
|
|
||||||
shell: true,
|
|
||||||
cwd: process.env.GITHUB_WORKSPACE || process.cwd()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function exportOutput(key, value) {
|
|
||||||
fs.appendFileSync(process.env.GITHUB_OUTPUT, `${key}=${value}\n`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setEnv(key, value) {
|
|
||||||
fs.appendFileSync(process.env.GITHUB_ENV, `${key}=${value}\n`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
const script = path.join(__dirname, "..", "scripts", "detect-version-change.sh");
|
|
||||||
|
|
||||||
|
|
||||||
run(script);
|
|
||||||
|
|
||||||
// Hier nehmen wir an, dass das Script selbst bereits `version_changed=true/false`
|
|
||||||
// in $GITHUB_OUTPUT geschrieben hat.
|
|
||||||
// Zur Sicherheit lesen wir das nochmal aus und speichern es auch als release-Flag.
|
|
||||||
const output = fs.readFileSync(process.env.GITHUB_OUTPUT, "utf-8");
|
|
||||||
const match = output.match(/^version_changed=(.*)$/m);
|
|
||||||
const value = match?.[1]?.trim() || "false";
|
|
||||||
|
|
||||||
exportOutput("release", value);
|
|
||||||
setEnv("VERSION_CHANGED", value);
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
43
dist/post.js
vendored
43
dist/post.js
vendored
@@ -1,43 +0,0 @@
|
|||||||
const cp = require("child_process");
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
function run(script, args = []) {
|
|
||||||
const cmd = typeof script === "string" ? script : script.join(" ");
|
|
||||||
cp.execSync(cmd, {
|
|
||||||
stdio: "inherit",
|
|
||||||
shell: true,
|
|
||||||
env: process.env,
|
|
||||||
cwd: process.env.GITHUB_WORKSPACE || process.cwd(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function scriptPath(...segments) {
|
|
||||||
return path.join(__dirname, "..", "scripts", ...segments);
|
|
||||||
}
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
const versionChanged = (process.env.VERSION_CHANGED || "false").toLowerCase() === "true";
|
|
||||||
|
|
||||||
const readCliffScript = scriptPath("read-cliff-version.sh");
|
|
||||||
const cliffVersion = cp
|
|
||||||
.execSync(readCliffScript, { encoding: "utf-8", shell: true })
|
|
||||||
.trim()
|
|
||||||
.split("\n")
|
|
||||||
.pop();
|
|
||||||
|
|
||||||
run(scriptPath("install-git-cliff.sh") + " " + cliffVersion);
|
|
||||||
|
|
||||||
run(
|
|
||||||
scriptPath("setup-git.sh") +
|
|
||||||
` "${process.env.INPUT_AUTHOR_NAME}" "${process.env.INPUT_AUTHOR_EMAIL}"`
|
|
||||||
);
|
|
||||||
|
|
||||||
if (versionChanged) {
|
|
||||||
process.env.RELEASE_PUBLISH_TOKEN = process.env.INPUT_TOKEN || "";
|
|
||||||
run(scriptPath("release-from-version.sh"));
|
|
||||||
} else {
|
|
||||||
run(scriptPath("generate-unreleased-changelog.sh"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
59
scripts/augment_context.py
Executable file
59
scripts/augment_context.py
Executable file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import json
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def git_commits_between(parent, merge):
|
||||||
|
"""Return list of commit hashes between parent and merge (exclusive of parent, inclusive of merge)."""
|
||||||
|
out = subprocess.check_output(
|
||||||
|
["git", "rev-list", f"{parent}..{merge}", "--no-merges"],
|
||||||
|
text=True
|
||||||
|
)
|
||||||
|
return [line.strip() for line in out.splitlines() if line.strip()]
|
||||||
|
|
||||||
|
def load_context(path=None):
|
||||||
|
if path:
|
||||||
|
with open(path) as f:
|
||||||
|
return json.load(f)
|
||||||
|
else:
|
||||||
|
return json.load(sys.stdin)
|
||||||
|
|
||||||
|
def main(path=None):
|
||||||
|
context = load_context(path)
|
||||||
|
commits = context[0]["commits"]
|
||||||
|
commits_by_id = {c["id"]: c for c in commits}
|
||||||
|
|
||||||
|
new_commits = []
|
||||||
|
consumed = set()
|
||||||
|
|
||||||
|
for c in commits:
|
||||||
|
if c.get("merge_commit"):
|
||||||
|
parents = subprocess.check_output(
|
||||||
|
["git", "rev-list", "--parents", "-n", "1", c["id"]],
|
||||||
|
text=True
|
||||||
|
).strip().split()
|
||||||
|
merge_id, *parent_ids = parents
|
||||||
|
|
||||||
|
if len(parent_ids) >= 2:
|
||||||
|
mainline = parent_ids[0]
|
||||||
|
children_ids = git_commits_between(mainline, merge_id)
|
||||||
|
|
||||||
|
children = []
|
||||||
|
for cid in children_ids:
|
||||||
|
if cid in commits_by_id:
|
||||||
|
children.append(commits_by_id[cid])
|
||||||
|
consumed.add(cid)
|
||||||
|
|
||||||
|
if not c.get("extra") or not isinstance(c["extra"], dict):
|
||||||
|
c["extra"] = {}
|
||||||
|
c["extra"]["children"] = children
|
||||||
|
|
||||||
|
new_commits.append(c)
|
||||||
|
|
||||||
|
filtered = [c for c in new_commits if c["id"] not in consumed]
|
||||||
|
context[0]["commits"] = filtered
|
||||||
|
|
||||||
|
json.dump(context, sys.stdout, indent=4)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main(sys.argv[1] if len(sys.argv) > 1 else None)
|
||||||
@@ -18,7 +18,6 @@ echo "Allow release from non-main branches: $ALLOW_NON_MAIN_RELEASE"
|
|||||||
if [[ "$ALLOW_NON_MAIN_RELEASE" != "true" && "$GIT_REF" != "refs/heads/main" ]]; then
|
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 "🚫 Not on 'main' branch and non-main releases are disabled – skipping version check."
|
||||||
echo "version_changed=false" >> "$GITHUB_OUTPUT"
|
echo "version_changed=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "release=false" >> "$GITHUB_OUTPUT"
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -29,10 +28,8 @@ if git diff --name-only "$COMMIT_BEFORE" "$COMMIT_AFTER" | grep -q "^$VERSION_FI
|
|||||||
echo "✅ VERSION file was changed"
|
echo "✅ VERSION file was changed"
|
||||||
echo "VERSION_CHANGED=true" >> "$GITHUB_ENV"
|
echo "VERSION_CHANGED=true" >> "$GITHUB_ENV"
|
||||||
echo "version_changed=true" >> "$GITHUB_OUTPUT"
|
echo "version_changed=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "release=true" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
else
|
||||||
echo "ℹ️ VERSION file not changed"
|
echo "ℹ️ VERSION file not changed"
|
||||||
echo "VERSION_CHANGED=false" >> "$GITHUB_ENV"
|
echo "VERSION_CHANGED=false" >> "$GITHUB_ENV"
|
||||||
echo "version_changed=false" >> "$GITHUB_OUTPUT"
|
echo "version_changed=false" >> "$GITHUB_OUTPUT"
|
||||||
echo "release=false" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ GIT_BRANCH="${GITHUB_REF##refs/heads/}"
|
|||||||
# === Step 1: Generate Changelog (only if file exists or on main) ===
|
# === Step 1: Generate Changelog (only if file exists or on main) ===
|
||||||
if [[ -f "$CHANGELOG_FILE" || "$GIT_BRANCH" == "main" ]]; then
|
if [[ -f "$CHANGELOG_FILE" || "$GIT_BRANCH" == "main" ]]; then
|
||||||
echo "📄 Generating $CHANGELOG_FILE using git-cliff..."
|
echo "📄 Generating $CHANGELOG_FILE using git-cliff..."
|
||||||
git-cliff -c "$CLIFF_CONFIG" -o "$CHANGELOG_FILE"
|
git-cliff -c "$CLIFF_CONFIG" --context \
|
||||||
|
| "${GITHUB_ACTION_PATH}/scripts/augment_context.py" \
|
||||||
|
| git-cliff -c "$CLIFF_CONFIG" --from-context - -o "$CHANGELOG_FILE"
|
||||||
else
|
else
|
||||||
echo "ℹ️ $CHANGELOG_FILE does not exist and branch is not 'main'. Skipping generation."
|
echo "ℹ️ $CHANGELOG_FILE does not exist and branch is not 'main'. Skipping generation."
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
9
scripts/install-python.sh
Executable file
9
scripts/install-python.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# install-python.sh – installs the latest Python version through apt
|
||||||
|
# Usage: sudo ./install-python.sh
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install -y python3
|
||||||
|
|
||||||
|
echo "✅ Python $(python3 --version) installed"
|
||||||
@@ -12,10 +12,10 @@ fi
|
|||||||
VERSION_LINE=$(awk -F '=' '/^# CLIFF_VERSION=/ { gsub(/[" ]/, "", $2); print $2 }' "$CLIFF_TOML" || true)
|
VERSION_LINE=$(awk -F '=' '/^# CLIFF_VERSION=/ { gsub(/[" ]/, "", $2); print $2 }' "$CLIFF_TOML" || true)
|
||||||
|
|
||||||
if [[ -n "$VERSION_LINE" ]]; then
|
if [[ -n "$VERSION_LINE" ]]; then
|
||||||
echo "✅ Extracted CLIFF_VERSION: $VERSION_LINE" >&2
|
echo "✅ Extracted CLIFF_VERSION: $VERSION_LINE"
|
||||||
else
|
else
|
||||||
echo "⚠️ No CLIFF_VERSION found in $CLIFF_TOML" >&2
|
echo "⚠️ No CLIFF_VERSION found in $CLIFF_TOML"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Output für GitHub Actions / Composite Action
|
||||||
echo "version=${VERSION_LINE:-}" >> "$GITHUB_OUTPUT"
|
echo "version=${VERSION_LINE:-}" >> "$GITHUB_OUTPUT"
|
||||||
echo "$VERSION_LINE"
|
|
||||||
@@ -64,7 +64,9 @@ echo "📦 Version: $VERSION"
|
|||||||
|
|
||||||
# === Step 2: Generate changelog for release ===
|
# === Step 2: Generate changelog for release ===
|
||||||
echo "📄 Generating changelog for tag v$VERSION"
|
echo "📄 Generating changelog for tag v$VERSION"
|
||||||
git-cliff -c "$CLIFF_CONFIG" -t "v$VERSION" -o "$CHANGELOG_FILE"
|
git-cliff -c "$CLIFF_CONFIG" -t "v$VERSION" --context \
|
||||||
|
| "${GITHUB_ACTION_PATH}/scripts/augment_context.py" \
|
||||||
|
| git-cliff -c "$CLIFF_CONFIG" -t "v$VERSION" --from-context - -o "$CHANGELOG_FILE"
|
||||||
|
|
||||||
ESCAPED_VERSION="$(echo "$VERSION" | sed 's/\./\\./g')"
|
ESCAPED_VERSION="$(echo "$VERSION" | sed 's/\./\\./g')"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user