Skip to content

Commit ea62eb9

Browse files
hypcompnerd
authored andcommitted
[GHA workflow] only create a latest release when running on main branch version
1 parent b49b337 commit ea62eb9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,8 +3176,14 @@ jobs:
31763176
env:
31773177
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31783178
run: |
3179+
branch_version_string=${{ inputs.swift_version || '0.0.0' }}
3180+
if [[ $branch_version_string == "0.0.0" ]]; then
3181+
latest="true"
3182+
else
3183+
latest="false"
3184+
fi
31793185
# Create Release
3180-
gh release create ${{ needs.context.outputs.swift_tag }} -R ${{ github.repository }}
3186+
gh release create ${{ needs.context.outputs.swift_tag }} -R ${{ github.repository }} --latest=${latest}
31813187
31823188
# AMD64
31833189
cd ${{ github.workspace }}/tmp/amd64

0 commit comments

Comments
 (0)