ci: Fix release workflow input booleans, remove snapshot (#5688)

* s/github.event.inputs/inputs/g

* Add run name and prevent non-dry-run releases on non-main branches

* Add logrun to lib.sh
This commit is contained in:
Mathias Fredriksson
2023-01-12 17:50:58 +02:00
committed by GitHub
parent 575bfabfcb
commit a5073a8770
3 changed files with 34 additions and 18 deletions

View File

@ -131,11 +131,18 @@ maybedryrun() {
log "DRYRUN: $*"
else
shift
log $ "$@"
"$@"
logrun "$@"
fi
}
# logrun prints the given program and flags, and then executes it.
#
# Usage: logrun gh release create ...
logrun() {
log $ "$*"
"$@"
}
# log prints a message to stderr.
log() {
echo "$*" 1>&2

View File

@ -167,7 +167,7 @@ else
fi
log
gh workflow run release.yaml \
logrun gh workflow run release.yaml \
--ref "$branch" \
-F increment="$increment" \
"${args[@]}"