This commit is contained in:
2026-10-26 22:54:24 +03:00
parent 4bdaa9048f
commit 8495003b69
10 changed files with 217 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
api="https://api.github.com/repos/acmagn/ratune/releases/latest"
json="$(curl --fail --silent --show-error --retry 3 "$api")"
tag="$(jq -er '.tag_name | select(test("^v[0-9]+\\.[0-9]+\\.[0-9]+"))' <<<"$json")"
version="${tag#v}"
current="$(tr -d '[:space:]' < .current-version 2>/dev/null || true)"
echo "Latest Ratune release: $tag"
echo "Previously published: ${current:-none}"
if [[ "$tag" == "$current" ]]; then
echo "Release already published; skipping."
{
echo "tag=$tag"
echo "version=$version"
echo "skip=true"
} >> "${GITHUB_OUTPUT:-/dev/null}"
exit 0
fi
{
echo "tag=$tag"
echo "version=$version"
echo "skip=false"
} >> "${GITHUB_OUTPUT:-/dev/null}"