Skip to content

Commit 3219437

Browse files
authored
Fix release workflow (#7341)
1 parent bed02d5 commit 3219437

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/scripts/update-version.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash -e
2+
3+
version=$1
4+
5+
sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$version/" version.gradle.kts
6+
7+
sed -Ei "1 s/(Comparing source compatibility of [a-z-]+)-[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)?.jar/\1-$version.jar/" docs/apidiffs/current_vs_latest/*.txt

.github/workflows/prepare-patch-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
echo "VERSION=$major_minor.$((patch + 1))" >> $GITHUB_ENV
3838
3939
- name: Update version
40-
run: sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/" version.gradle.kts
40+
run: .github/scripts/update-version.sh $VERSION
4141

4242
- name: Update the change log with the approximate release date
4343
run: |

.github/workflows/prepare-release-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ jobs:
100100
echo "unexpected version: $version"
101101
exit 1
102102
fi
103-
echo "NEXT_VERSION=$next_version" >> $GITHUB_ENV
103+
echo "NEXT_VERSION=${next_version}-SNAPSHOT" >> $GITHUB_ENV
104104
echo "VERSION=$version" >> $GITHUB_ENV
105105
106106
- name: Update version
107-
run: sed -Ei "s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/" version.gradle.kts
107+
run: .github/scripts/update-version.sh $NEXT_VERSION
108108

109109
- name: Update the change log on main
110110
run: |

0 commit comments

Comments
 (0)