Skip to content

Commit

Permalink
Fix release script in CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Nov 21, 2023
1 parent b71d9ff commit 0ac1f47
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/scripts/create_github_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,14 @@ main() {

setup_echo_colours

# Use Github's hub CLI to create our release
# See https://github.com/github/hub
echo -e "${GREEN}Finding asset files for release${NC}"
local args=()
local asset_files=()
for asset_file in "${BUILD_DIR}/release_artefacts/"*; do
echo -e "${GREEN}Found asset file: ${BLUE}${asset_file}${NC}"
args+=(
"--attach"
"${asset_file}"
)
asset_files+=("${asset_file}")
done

local args=()
if [[ ${GITHUB_REF} =~ .*(beta|alpha).* ]]; then
echo -e "${GREEN}Release is a pre-release${NC}"
args+=("--prerelease")
Expand All @@ -81,13 +77,18 @@ main() {
echo -e "${DGREY}${message}${NC}"
echo -e "${DGREY}------------------------------------------------------------------------${NC}"

# Extract the subject/body from the annotated git tag
hub release create \
-m "${message}" \

# Create the release on GitHub using the annotated tag that triggered
# this build
# See https://cli.github.com/manual/gh_release_create
gh release create \
--title "${BUILD_TAG}" \
--notes "${message}" \
--verify-tag \
"${args[@]}" \
"${BUILD_TAG}"
"${BUILD_TAG}" \
"${asset_files[@]}"

#hub release create "${args[@]}" "$BUILD_TAG"
echo "${GREEN}Release created for tag ${BLUE}${BUILD_TAG}${NC}"
}

Expand Down
19 changes: 19 additions & 0 deletions unreleased_changes/20231121_101019_916__0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* Fix CI build.


```sh
# ONLY the top line will be included as a change entry in the CHANGELOG.
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
# 'Fixed nasty bug'.
#
# Examples of acceptable entries are:
#
#
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
#
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
#
# * Fix bug with no associated GitHub issue.
```

0 comments on commit 0ac1f47

Please sign in to comment.