Skip to content

Commit 8eec1b3

Browse files
authored
Release workflow fixes (open-telemetry#4361)
* Fix release workflow * more
1 parent 771eab7 commit 8eec1b3

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

.github/scripts/generate-release-contributors.sh

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ echo $contributors1 $contributors2 \
7979
| grep -v linux-foundation-easycla \
8080
| grep -v github-actions \
8181
| grep -v dependabot \
82+
| grep -v codecov \
8283
| sed 's/^/@/'

.github/workflows/release.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@ jobs:
5353
env:
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555
run: |
56-
if [[ $version == *.0 ]]; then
57-
cat > release-notes.txt << EOF
58-
This release targets the OpenTelemetry SDK $VERSION.
56+
# conditional blocks not indented because of the heredoc
57+
if [[ $VERSION == *.0 ]]; then
58+
cat > release-notes.txt << EOF
59+
This release targets the OpenTelemetry SDK $VERSION.
5960
60-
EOF
61+
EOF
6162
else
62-
cat > release-notes.txt << EOF
63-
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
63+
cat > release-notes.txt << EOF
64+
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
6465
65-
EOF
66+
EOF
6667
fi
6768
6869
sed -n "/^## Version $VERSION/,/^## Version /p" CHANGELOG.md \
@@ -74,15 +75,16 @@ jobs:
7475
| perl -0pe 's/\n +/ /g' \
7576
>> release-notes.txt
7677
77-
if [[ $version == *.0 ]]; then
78-
cat >> release-notes.txt << EOF
78+
# conditional block not indented because of the heredoc
79+
if [[ $VERSION == *.0 ]]; then
80+
cat >> release-notes.txt << EOF
7981
80-
### 🙇 Thank you
81-
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
82+
### 🙇 Thank you
83+
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
8284
83-
EOF
85+
EOF
8486
85-
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION v$VERSION >> release-notes.txt
87+
.github/scripts/generate-release-contributors.sh v$PRIOR_VERSION $GITHUB_REF_NAME >> release-notes.txt
8688
fi
8789
8890
- name: Create GitHub release

docs/common-github-actions-practices.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,11 +631,12 @@ jobs:
631631
env:
632632
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
633633
run: |
634-
if [[ $version != *.0 ]]; then
635-
cat > release-notes.txt << EOF
636-
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
634+
# conditional block not indented because of the heredoc
635+
if [[ $VERSION != *.0 ]]; then
636+
cat > release-notes.txt << EOF
637+
This is a patch release on the previous $PRIOR_VERSION release, fixing the issue(s) below.
637638
638-
EOF
639+
EOF
639640
fi
640641
641642
# TODO this is dependent on the conventions you follow in your CHANGELOG.md

0 commit comments

Comments
 (0)