Skip to content

Commit a05f70b

Browse files
committed
doc: replaced go.mod badge by github version
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 <fredbi@yahoo.com>
1 parent a95d3c2 commit a05f70b

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
fetch-depth: 0
2828
-
2929
name: Extract tag message
30-
id: get_message
31-
# git-cliff may or may not pick the current tag message, difficult to tell when
32-
# this works. We extract the tag message explicitly.
30+
id: get-message
31+
# tag message is not retrieved unless with fetch the ref explictly
3332
run: |
33+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3434
MESSAGE=$(git tag -l '${{ github.ref_name }}' --format='%(contents:subject)
3535
3636
%(contents:body)
@@ -41,6 +41,9 @@ jobs:
4141
printenv MESSAGE
4242
echo 'EOF'
4343
} >> "${GITHUB_OUTPUT}"
44+
45+
echo "Message in git tag ${{ github.ref_name }}"
46+
echo "$MESSAGE"
4447
-
4548
name: Generate release notes
4649
id: notes
@@ -52,9 +55,10 @@ jobs:
5255
config: '.cliff.toml'
5356
args: >-
5457
--current
55-
--with-tag-message '${{ steps.get_message.outputs.message }}'
58+
--with-tag-message '${{ steps.get-message.outputs.message }}'
5659
-
5760
name: Create github release
5861
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
5962
with:
6063
body: ${{ steps.notes.outputs.content }}
64+
generate_release_notes: false

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ using the special trailing character "-" is not implemented.
114114
[codeql-badge]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml/badge.svg
115115
[codeql-url]: https://github.com/go-openapi/jsonpointer/actions/workflows/codeql.yml
116116
<!-- Badges: release & docker images -->
117-
[release-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg
118-
[release-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer
117+
[release-badge]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer.svg
118+
[release-url]: https://badge.fury.io/gh/go-openapi%2Fjsonpointer
119+
[gomod-badge]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer.svg
120+
[gomod-url]: https://badge.fury.io/go/github.com%2Fgo-openapi%2Fjsonpointer
119121
<!-- Badges: code quality -->
120122
[gocard-badge]: https://goreportcard.com/badge/github.com/go-openapi/jsonpointer
121123
[gocard-url]: https://goreportcard.com/report/github.com/go-openapi/jsonpointer

0 commit comments

Comments
 (0)