From 1c34e3570a564fbedb3f1991433abbc8e34142ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BIDON?= Date: Thu, 27 Nov 2025 22:58:04 +0100 Subject: [PATCH] doc: replaced go.mod badge by github version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit doc: readme * go moodule badge may not display correctly in mono-repos * added webhook to notify fury.io about release events ci: explicitly instructed release action not to auto-generate notes with github API ci: fixed git fetch tag THe release workflow didn't properly fetch the annotations in the current tag. This fixes this "shallow checkout" issue, so release notes now properly pick the tag message to render as headlines. Signed-off-by: Frédéric BIDON --- .github/workflows/release.yml | 12 ++++++++---- README.md | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec13715..2f52b3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,10 +27,10 @@ jobs: fetch-depth: 0 - name: Extract tag message - id: get_message - # git-cliff may or may not pick the current tag message, difficult to tell when - # this works. We extract the tag message explicitly. + id: get-message + # tag message is not retrieved unless with fetch the ref explictly run: | + git fetch --depth=1 origin +refs/tags/*:refs/tags/* MESSAGE=$(git tag -l '${{ github.ref_name }}' --format='%(contents:subject) %(contents:body) @@ -41,6 +41,9 @@ jobs: printenv MESSAGE echo 'EOF' } >> "${GITHUB_OUTPUT}" + + echo "Message in git tag ${{ github.ref_name }}" + echo "$MESSAGE" - name: Generate release notes id: notes @@ -52,9 +55,10 @@ jobs: config: '.cliff.toml' args: >- --current - --with-tag-message '${{ steps.get_message.outputs.message }}' + --with-tag-message '${{ steps.get-message.outputs.message }}' - name: Create github release uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 with: body: ${{ steps.notes.outputs.content }} + generate_release_notes: false diff --git a/README.md b/README.md index 00cbfd7..1f98ab0 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,10 @@ using the special trailing character "-" is not implemented. [codeql-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml/badge.svg [codeql-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml -[release-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg -[release-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer +[release-badge]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer.svg +[release-url]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer +[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg +[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer [gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonpointer [gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonpointer