Skip to content

Commit

Permalink
add action for publishing gh release
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalus committed Feb 9, 2024
1 parent 047f673 commit f1d4d88
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ publish_dockerhub_multiarch() {
run_log "Pushing manifest $DOCKER_MULTIARCH_MANIFEST_LATEST" podman manifest push --all $DOCKER_MULTIARCH_MANIFEST_LATEST
}

publish_github() {
if [ -n "$1" ]; then
RELEASE_NOTES_FILE="$1"
elif [ -f "release-notes-$RELEASE_TIMESTAMP" ]; then
RELEASE_NOTES_FILE="release-notes-$RELEASE_TIMESTAMP"
fi
run_log "Publishing release to GitHub" gh release create -d -t pld-linux-arm-$RELEASE_TIMESTAMP ${RELEASE_NOTES_FILE:+-F $RELEASE_NOTES_FILE} pld-linux-arm-$RELEASE_TIMESTAMP *$RELEASE_TIMESTAMP*{xz,asc,packages}
}

image_unmount_fs() {
if [ -n "$IMAGE_MOUNT_DIR" ] && [ -d "$IMAGE_MOUNT_DIR" ]; then
if [ -d "$IMAGE_MOUNT_DIR/boot/efi" ] && mountpoint -q "$IMAGE_MOUNT_DIR/boot/efi"; then
Expand Down Expand Up @@ -746,6 +755,11 @@ case "$1" in
ACTION=$1-$2
$1_dockerhub_multiarch
;;
github)
ACTION=$1-$2
shift 2
$1_github "$@"
;;
*)
ACTION=unknown
error "Unknown publish target: $2"
Expand Down

0 comments on commit f1d4d88

Please sign in to comment.