Skip to content

Commit a0b3f44

Browse files
committed
Check version has been updated when publishing a release
Rather than updating the version, check that it has been. We need the update in the branch itself so that the toolchain version is also updated.
1 parent caf169d commit a0b3f44

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/publish_release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767
echo "swift_format_version=$SWIFT_FORMAT_VERSION" >> "$GITHUB_OUTPUT"
6868
- name: Checkout repository
6969
uses: actions/checkout@v4
70+
- name: Check version updated
71+
run: |
72+
grep '"${{ steps.swift_format_version.outputs.swift_format_version }}"' Sources/swift-format/PrintVersion.swift
7073
- name: Create release commits
7174
id: create_release_commits
7275
run: |
@@ -81,10 +84,6 @@ jobs:
8184
git add Package.swift
8285
git commit -m "Change swift-syntax dependency to ${{ steps.swift_syntax_tag.outputs.swift_syntax_tag }}"
8386
84-
sed -E -i "s#print\(\".*\"\)#print\(\"${{ steps.swift_format_version.outputs.swift_format_version }}\"\)#" Sources/swift-format/PrintVersion.swift
85-
git add Sources/swift-format/PrintVersion.swift
86-
git commit -m "Change version to ${{ steps.swift_format_version.outputs.swift_format_version }}"
87-
8887
{
8988
echo 'release_commit_patch<<EOF'
9089
git format-patch "$BASE_COMMIT"..HEAD --stdout

0 commit comments

Comments
 (0)