You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@casbin.apache.org by hs...@apache.org on 2026/04/25 09:23:20 UTC
(casbin) branch master updated: fix: fix GitHub release notes (#1725)
This is an automated email from the ASF dual-hosted git repository.
hsluoyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/casbin.git
The following commit(s) were added to refs/heads/master by this push:
new e85fcda fix: fix GitHub release notes (#1725)
e85fcda is described below
commit e85fcdae66d98bf48801aff1676321c454fe8e85
Author: cooronx <54...@users.noreply.github.com>
AuthorDate: Sat Apr 25 17:23:16 2026 +0800
fix: fix GitHub release notes (#1725)
---
.github/workflows/source-release-draft.yml | 13 +++++++------
.github/workflows/source-snapshot.yml | 18 ++++++++++++++++--
2 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/source-release-draft.yml b/.github/workflows/source-release-draft.yml
index 084976c..5caa3f7 100644
--- a/.github/workflows/source-release-draft.yml
+++ b/.github/workflows/source-release-draft.yml
@@ -69,7 +69,9 @@ jobs:
- name: Generate release notes
run: |
CURRENT_TAG="${{ steps.release.outputs.tag }}"
+ CURRENT_VERSION="${CURRENT_TAG#v}"
PREVIOUS_TAG="${{ steps.release.outputs.previous_tag }}"
+ RELEASE_DATE="$(date -u +%F)"
RANGE="${CURRENT_TAG}"
if [ -n "${PREVIOUS_TAG}" ]; then
@@ -81,15 +83,14 @@ jobs:
DOCS="$(git log --pretty=format:'%s (%h)' "${RANGE}" | grep -Ei '^(docs?|doc)(\(.+\))?: ' || true)"
{
- echo "# Casbin ${CURRENT_TAG}"
- echo
- echo "This GitHub release is a draft helper for packaging and release notes."
- echo
if [ -n "${PREVIOUS_TAG}" ]; then
- echo "Changes since ${PREVIOUS_TAG}."
+ echo "# [${CURRENT_VERSION}](https://github.com/${GITHUB_REPOSITORY}/compare/${PREVIOUS_TAG}...${CURRENT_TAG}) (${RELEASE_DATE})"
+ else
+ echo "# ${CURRENT_VERSION} (${RELEASE_DATE})"
fi
echo
-
+ echo "This GitHub release is a draft helper for packaging and release notes."
+ echo
if [ -n "${FEATURES}" ]; then
echo "## Features"
echo
diff --git a/.github/workflows/source-snapshot.yml b/.github/workflows/source-snapshot.yml
index d679767..b528c8b 100644
--- a/.github/workflows/source-snapshot.yml
+++ b/.github/workflows/source-snapshot.yml
@@ -64,7 +64,14 @@ jobs:
SNAPSHOT_VERSION="v${BASE_VERSION}-snapshot.${NEXT_SNAPSHOT_NUMBER}"
BASENAME="casbin-${SNAPSHOT_VERSION#v}-src"
+ if [ "${LAST_SNAPSHOT_NUMBER}" -gt 0 ]; then
+ CHANGELOG_START_TAG="v${BASE_VERSION}-snapshot.${LAST_SNAPSHOT_NUMBER}"
+ else
+ CHANGELOG_START_TAG="${LATEST_RELEASE_TAG}"
+ fi
+
echo "latest_release_tag=${LATEST_RELEASE_TAG}" >> "${GITHUB_OUTPUT}"
+ echo "changelog_start_tag=${CHANGELOG_START_TAG}" >> "${GITHUB_OUTPUT}"
echo "base_version=${BASE_VERSION}" >> "${GITHUB_OUTPUT}"
echo "number=${NEXT_SNAPSHOT_NUMBER}" >> "${GITHUB_OUTPUT}"
echo "version=${SNAPSHOT_VERSION}" >> "${GITHUB_OUTPUT}"
@@ -72,7 +79,10 @@ jobs:
- name: Generate snapshot release notes
run: |
- PREVIOUS_TAG="${{ steps.snapshot.outputs.latest_release_tag }}"
+ PREVIOUS_TAG="${{ steps.snapshot.outputs.changelog_start_tag }}"
+ CURRENT_TAG="${{ steps.snapshot.outputs.version }}"
+ CURRENT_VERSION="${CURRENT_TAG#v}"
+ RELEASE_DATE="$(date -u +%F)"
RANGE="HEAD"
if [ -n "${PREVIOUS_TAG}" ]; then
@@ -84,7 +94,11 @@ jobs:
DOCS="$(git log --pretty=format:'%s (%h)' "${RANGE}" | grep -Ei '^(docs?|doc)(\(.+\))?: ' || true)"
{
- echo "# Casbin ${{ steps.snapshot.outputs.version }}"
+ if [ -n "${PREVIOUS_TAG}" ]; then
+ echo "# [${CURRENT_VERSION}](https://github.com/${GITHUB_REPOSITORY}/compare/${PREVIOUS_TAG}...${CURRENT_TAG}) (${RELEASE_DATE})"
+ else
+ echo "# ${CURRENT_VERSION} (${RELEASE_DATE})"
+ fi
echo
if [ -n "${FEATURES}" ]; then
echo "## Features"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@casbin.apache.org
For additional commands, e-mail: commits-help@casbin.apache.org