Automate draft release
This commit is contained in:
21
ci/build/release-github-assets.sh
Executable file
21
ci/build/release-github-assets.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Downloads the release artifacts from CI for the current
|
||||
# commit and then uploads them to the release with the version
|
||||
# in package.json.
|
||||
# You will need $GITHUB_TOKEN set.
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/../.."
|
||||
source ./ci/lib.sh
|
||||
|
||||
download_artifact release-packages ./release-packages
|
||||
local assets=(./release-packages/*)
|
||||
for i in "${!assets[@]}"; do
|
||||
assets[$i]="--attach=${assets[$i]}"
|
||||
done
|
||||
EDITOR=true hub release edit --draft "${assets[@]}" "v$(pkg_json_version)"
|
||||
}
|
||||
|
||||
main "$@"
|
21
ci/build/release-github-draft.sh
Executable file
21
ci/build/release-github-draft.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Creates a draft release with the template for the version in package.json
|
||||
|
||||
main() {
|
||||
cd "$(dirname "$0")/../.."
|
||||
source ./ci/lib.sh
|
||||
|
||||
hub release create \
|
||||
--file - \
|
||||
--draft "${assets[@]}" "v$(pkg_json_version)" << EOF
|
||||
v$(pkg_json_version)
|
||||
|
||||
VS Code v$(vscode_version)
|
||||
|
||||
- Summarize changes here with references to issues
|
||||
EOF
|
||||
}
|
||||
|
||||
main "$@"
|
Reference in New Issue
Block a user