Compare commits

...

3 Commits

Author SHA1 Message Date
e715106e05 feat(script): add installer for git-cliff binary
All checks were successful
Auto Changelog & (Release) / release (push) Successful in 7s
- Introduce a bash script to install the git-cliff binary
- Support fetching the latest or specific versions from GitHub
- Ensure compatibility with x86_64 Linux systems
- Validate required tools and handle installation errors
2025-06-27 21:33:15 +02:00
a1ad2caa04 feat(vscode): add custom activity bar color settings
- Introduces custom color configurations for the activity bar
  and badges in Visual Studio Code.
- Enhances the visual appearance and personalization.
2025-06-27 21:32:56 +02:00
d1ce6d90fb chore(workflows): add release workflow and merge message template
- Add a default merge message template for pull requests
- Introduce a release workflow to automate changelog generation
- Configure workflow to trigger on pushes to main and other branches
2025-06-27 21:32:35 +02:00
4 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
chore(pr): ${PullRequestTitle} ${PullRequestReference}
${PullRequestDescription}
Merged from ${HeadBranch} into ${BaseBranch}

View File

@@ -0,0 +1,19 @@
name: Auto Changelog & (Release)
on:
push:
branches:
- main
- "**"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Release
uses: https://git.0xmax42.io/actions/auto-changelog-release-action@v0
with:
token: ${{ secrets.RELEASE_PUBLISH_TOKEN }}

11
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#b66d9f",
"activityBar.background": "#b66d9f",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#b9ca95",
"activityBarBadge.foreground": "#15202b"
},
"peacock.color": "#a05087"
}

82
install-git-cliff.sh Normal file
View File

@@ -0,0 +1,82 @@
#!/usr/bin/env bash
# install-git-cliff.sh – fetches the latest or specified git-cliff binary (x86_64)
# Usage: sudo ./install-git-cliff.sh # latest version
# sudo ./install-git-cliff.sh 2.9.0 # specific version
# sudo ./install-git-cliff.sh -h # help
set -euo pipefail
REPO="orhun/git-cliff"
ARCH_OS="x86_64-unknown-linux-gnu"
INSTALL_DIR="/usr/local/bin"
VERSION="${1:-latest}"
# 0 Handle -h/--help option
if [[ "$VERSION" == "-h" || "$VERSION" == "--help" ]]; then
cat <<EOF
install-git-cliff.sh – Installs the git-cliff binary (x86_64)
Usage:
sudo ./install-git-cliff.sh
Install the latest version
sudo ./install-git-cliff.sh <version>
Install a specific version (e.g. 2.9.0)
sudo ./install-git-cliff.sh -h | --help
Show this help message
This script downloads the appropriate release archive from GitHub,
extracts it, and installs the 'git-cliff' binary to ${INSTALL_DIR}.
EOF
exit 0
fi
# 1 Check for required tools
need() { command -v "$1" >/dev/null || { echo "$1 is missing"; exit 1; }; }
need curl; need tar; need grep; need sed; need awk; need jq
# 2 Determine version → Fetch release JSON
if [[ "$VERSION" == "latest" ]]; then
API_URL="https://api.github.com/repos/${REPO}/releases/latest"
else
API_URL="https://api.github.com/repos/${REPO}/releases/tags/v${VERSION}"
fi
echo "🔍 Fetching release info ($API_URL)…"
JSON=$(curl -fsSL "$API_URL") || {
echo "❌ Failed to fetch release info"
exit 1
}
VERSION=$(jq -r '.tag_name' <<< "$JSON") || {
echo "❌ Could not extract version"
exit 1
}
ASSET_URL=$(jq -r '.assets[]?.browser_download_url' <<< "$JSON" |
grep "${ARCH_OS}\.tar" | head -n1)
if [[ -z "$ASSET_URL" ]]; then
echo "❌ Matching asset not found for architecture ${ARCH_OS}"
exit 1
fi
ASSET_FILE=$(basename "$ASSET_URL")
echo "📦 Downloading git-cliff v${VERSION} (${ASSET_FILE}) …"
TMP=$(mktemp -d)
curl -#L -o "${TMP}/${ASSET_FILE}" "$ASSET_URL"
# 3 Extract based on file extension
case "$ASSET_FILE" in
*.tar.gz|*.tgz) tar -C "$TMP" -xzf "${TMP}/${ASSET_FILE}" ;;
*.tar.xz) tar -C "$TMP" -xJf "${TMP}/${ASSET_FILE}" ;;
*.zip) need unzip; unzip -q "${TMP}/${ASSET_FILE}" -d "$TMP" ;;
*) echo "❌ Unknown archive format: $ASSET_FILE"; exit 1 ;;
esac
# 4 Locate and install binary
BIN_PATH=$(find "$TMP" -type f -name git-cliff -perm -u+x | head -n1)
[[ -z "$BIN_PATH" ]] && { echo "❌ Binary not found"; exit 1; }
sudo install -m755 "$BIN_PATH" "${INSTALL_DIR}/git-cliff"
echo "✅ git-cliff $(git-cliff --version) installed in ${INSTALL_DIR}"