generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Check if release already exists (#256)
<!-- Thank you for your contribution. Before you submit the pull request: 1. Follow contributing guidelines, templates, the recommended Git workflow, and any related documentation. 2. Read and submit the required Contributor Licence Agreements (https://github.com/kyma-project/community/blob/main/CONTRIBUTING.md#agreements-and-licenses). 3. Test your changes and attach their results to the pull request. 4. Update the relevant documentation. If the pull request requires a decision, follow the [decision-making process](https://github.com/kyma-project/community/blob/main/governance.md) and replace the PR template with the [decision record template](https://github.com/kyma-project/community/blob/main/.github/ISSUE_TEMPLATE/decision-record.md). --> **Description** **Related issue(s)** <!-- If you refer to a particular issue, provide its number. For example, `Resolves #123`, `Fixes #43`, or `See also #33`. -->
- Loading branch information
Showing
9 changed files
with
46 additions
and
24 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
scripts/release/create_changelog.sh → .github/scripts/release/create_changelog.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o nounset | ||
set -o pipefail | ||
|
||
RELEASE_TAG=$1 | ||
GITHUB_TOKEN=$2 | ||
|
||
GITHUB_URL=https://api.github.com/repos/$CODE_REPOSITORY | ||
GITHUB_AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN" | ||
|
||
curl -L \ | ||
-s \ | ||
--fail-with-body \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "$GITHUB_AUTH_HEADER" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"$GITHUB_URL"/releases/tags/"$RELEASE_TAG" | ||
|
||
CURL_EXIT_CODE=$? | ||
|
||
if [[ $CURL_EXIT_CODE == 0 ]]; then | ||
echo "Release with tag: $RELEASE_TAG already exists!" | ||
exit 1 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters