From f7722da1939d11ed991090271c6538d4ceaf1fa0 Mon Sep 17 00:00:00 2001 From: comfysage <67917529+comfysage@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:05:05 +0200 Subject: [PATCH] chore: add stable release scripts --- scripts/release/stable/changelog.sh | 5 +++++ scripts/release/stable/create.sh | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 scripts/release/stable/changelog.sh create mode 100644 scripts/release/stable/create.sh diff --git a/scripts/release/stable/changelog.sh b/scripts/release/stable/changelog.sh new file mode 100644 index 0000000..335ebb4 --- /dev/null +++ b/scripts/release/stable/changelog.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# show changes since the last version tag and bump version +# -------------------------------------------------------- +git cliff -u --bump diff --git a/scripts/release/stable/create.sh b/scripts/release/stable/create.sh new file mode 100644 index 0000000..39736c8 --- /dev/null +++ b/scripts/release/stable/create.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +version="$(git cliff --bumped-version)" +n_version="$(git cliff --bumped-version | sed -e 's/^v//')" + +# show changes since last release (ignoring nightly) and tag current HEAD with +# bumped version +# ---------------------------------------------------------------------------- +./scripts/release/stable/changelog.sh > CHANGELOG.md +git tag -f "$version" +git push --tags --force + +# delete last nightly release and create new nightly release from changelog +# create release with: +# - *title*: number of version +# - *tag*: version +# - *branch|target*: version +# ------------------------------------------------------------------------- +[[ $FORCE -gt 0 ]] && gh release delete "$n_version" -y +gh release create "$n_version" -t "$version" -F CHANGELOG.md