Skip to content

Commit

Permalink
GitHub: Improve release creation. (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gacko authored Sep 5, 2024
1 parent 94bcf38 commit bb1b79e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,25 @@ jobs:
version: ${{ steps.get-provider-version.outputs.version }}
tag: ${{ steps.get-release.outputs.tag }}
run: |
# Define title, notes & files.
title="Workload cluster release ${version} for ${provider}"
notes="This release was automatically created by GitHub Actions."
# Map title.
case "${provider}" in
aws)
title="AWS ${version}"
;;
azure)
title="Azure ${version}"
;;
*)
title="${provider} ${version}"
;;
esac
# Define notes & files.
notes="${release}/README.md"
files=("${release}/release.yaml")
# Determine pre-release.
[[ "${version}" == v*.*.*-* ]] && prerelease="--prerelease" || prerelease=""
# Create release.
gh release create --target "${GITHUB_REF_NAME}" "${tag}" --title "${title}" --notes "${notes}" ${files[@]} ${prerelease}
gh release create --target "${GITHUB_REF_NAME}" "${tag}" --title "${title}" --notes-file "${notes}" ${files[@]} ${prerelease}

0 comments on commit bb1b79e

Please sign in to comment.