Skip to content

Commit

Permalink
makes sure we can run non-interactively in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali committed Jul 31, 2024
1 parent ff82a7b commit 7ade03c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,18 @@ jobs:
set -euo pipefail
version=${{ steps.version.outputs.version }}
if gh release view $version; then
# check if release already exists and match the version
if [[ $(gh release view $version --json name -q '.name' | cat) == $version ]]; then
echo "Release $version already exists"
exit 0
fi
echo "Creating release $version"
# if version contains -rc, publish as a pre-release and don't set as latest
if [[ $version == *-rc* ]]; then
gh release create $version -t $version --generate-notes --prerelease --latest=false --verify-tag build/${version}.tgz#helm.tar.gz
else
echo "Creating release $version"
# if version contains -rc, publish as a pre-release and not latest
if [[ $version == *-rc* ]]; then
gh release create $version -t $version --generate-notes --prerelease --latest=false --verify-tag build/${version}.tgz#helm.tar.gz
else
gh release create $version -t $version --generate-notes --verify-tag build/${version}.tgz#helm.tar.gz
fi
gh release create $version -t $version --generate-notes --verify-tag build/${version}.tgz#helm.tar.gz
fi
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 7ade03c

Please sign in to comment.