Skip to content

Commit a63121a

Browse files
committed
Update release workflow
1 parent e5d4f6c commit a63121a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# Source: https://github.com/panubo/reference-github-actions/blob/master/github-release.yml
1+
# Source: https://github.com/panubo/reference-github-actions/blob/main/github-release.yml
2+
# Description: Create a GitHub release
3+
# LICENSE: MIT License, Copyright (c) 2021-2023 Volt Grid Pty Ltd t/a Panubo
4+
5+
name: GitHub Release
26

37
on:
48
push:
59
tags:
6-
- '*'
7-
8-
name: GitHub Release
10+
- 'v*'
911

1012
jobs:
1113
build:
@@ -14,19 +16,19 @@ jobs:
1416
steps:
1517

1618
- name: Checkout code
17-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
1820
with:
19-
fetch-depth: 0
21+
fetch-depth: 0 # Required for git log to work
2022

2123
- name: Get Release Notes
2224
id: get_release_notes
2325
run: |
24-
NOTES=$(git log --pretty=format:%s $(git tag --sort=-refname | head -1)...$(git tag --sort=-refname | head -2 | tail -1) | awk '{ print "-", $0 }')
26+
NOTES=$(git log --pretty=format:%s $(git tag --sort=-v:refname | head -1)...$(git tag --sort=-v:refname | head -2 | tail -1) | awk '{ print "-", $0 }')
2527
NOTES="${NOTES//'%'/'%25'}"
2628
NOTES="${NOTES//$'\n'/'%0A'}"
2729
NOTES="${NOTES//$'\r'/'%0D'}"
2830
echo "NOTES: ${NOTES}"
29-
echo "::set-output name=notes::${NOTES}"
31+
echo "notes=${NOTES}" >> $GITHUB_OUTPUT
3032
3133
- name: Create Release
3234
id: create_release

0 commit comments

Comments
 (0)