mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-04 03:00:03 +00:00
Fixes for the CI (#242)
This commit is contained in:
parent
450e29d9cc
commit
51b300d29e
13 changed files with 375 additions and 276 deletions
|
@ -1,15 +1,16 @@
|
|||
if ($ref | startswith("refs/tags/v")) then {
|
||||
if $for_release then {
|
||||
output: "release",
|
||||
profile: "release",
|
||||
args: ($matrix.release_build_args // ""),
|
||||
} else {
|
||||
output: "debug",
|
||||
profile: "dev",
|
||||
args: ($matrix.debug_build_args // ""),
|
||||
args: ($matrix.debug_build_args // "--no-default-features --features rustls"),
|
||||
} end
|
||||
|
|
||||
{
|
||||
CTOOL: (if $matrix."use-cross" then "cross" else "cargo" end),
|
||||
CBIN: (if ($matrix.target | test("windows")) then "cargo-binstall.exe" else "cargo-binstall" end),
|
||||
CTOOL: (if ($matrix."use-cross" // false) then "cross" else "cargo" end),
|
||||
COUTPUT: .output,
|
||||
CARGS: "--target \($matrix.target) --profile \(.profile) \(.args)",
|
||||
}
|
||||
|
|
16
ci-scripts/extract-release-notes.sh
Executable file
16
ci-scripts/extract-release-notes.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
release_pr=$(head -n1 <<< "${COMMIT_MESSAGE:-}" | jq -Rr 'split("[()]"; "")[1] // ""')
|
||||
if [[ -z "$release_pr" ]]; then
|
||||
echo "::set-output name=notes_json::null"
|
||||
exit
|
||||
fi
|
||||
|
||||
gh \
|
||||
pr --repo "$GITHUB_REPO" \
|
||||
view "$release_pr" \
|
||||
--json body \
|
||||
--jq '"::set-output name=notes_json::\((.body | split("### Release notes")[1] // "") | tojson)"'
|
||||
|
||||
|
6
ci-scripts/extract-tag-from-release-commit.sh
Executable file
6
ci-scripts/extract-tag-from-release-commit.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
message="$(head -n1 <<< "$COMMIT_MESSAGE")"
|
||||
version="$(cut -d ' ' -f 2 <<< "${message}")"
|
||||
echo "::set-output name=version::${version}"
|
18
ci-scripts/pack-release-archives.sh
Executable file
18
ci-scripts/pack-release-archives.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
for o in outputs/*; do
|
||||
pushd "$o"
|
||||
|
||||
chmod +x cargo-binstall*
|
||||
cp ../../LICENSE.txt ../../README.md .
|
||||
|
||||
target=$(basename "$o" | cut -d. -f1)
|
||||
if grep -qE '(apple|windows)' <<< "$target"; then
|
||||
zip "../cargo-binstall-${target}.zip" *
|
||||
else
|
||||
tar cv * | gzip -9 > "../cargo-binstall-${target}.tgz"
|
||||
fi
|
||||
|
||||
popd
|
||||
done
|
28
ci-scripts/release-pr.txt
Normal file
28
ci-scripts/release-pr.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
This is a release PR for version **%version%**.
|
||||
|
||||
**Use squash merge.**
|
||||
Upon merging, this will automatically build the CLI and create a GitHub release.
|
||||
You still need to manually publish the cargo crate.
|
||||
|
||||
```
|
||||
$ git pull
|
||||
$ git checkout v%version%
|
||||
$ cargo publish
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
_Edit release notes into the section below:_
|
||||
|
||||
<!-- do not change or remove this heading -->
|
||||
### Release notes
|
||||
|
||||
_Binstall is a tool to fetch and install Rust-based executables as binaries. It aims to be a drop-in replacement for `cargo install` in most cases. Install it today with `cargo install cargo-binstall`, from the binaries below, or if you already have it, upgrade with `cargo binstall cargo-binstall`._
|
||||
|
||||
#### In this release:
|
||||
|
||||
-
|
||||
|
||||
#### Other changes:
|
||||
|
||||
-
|
|
@ -24,10 +24,13 @@ cargo binstall --help >/dev/null
|
|||
cargo binstall --help >/dev/null
|
||||
|
||||
# Install binaries using secure mode
|
||||
min_tls=1.3
|
||||
[[ "${2:-}" == "Windows" ]] && min_tls=1.2 # WinTLS on GHA doesn't support 1.3 yet
|
||||
|
||||
"./$1" binstall \
|
||||
--log-level debug \
|
||||
--secure \
|
||||
--min-tls-version 1.3 \
|
||||
--min-tls-version $min_tls \
|
||||
--no-confirm \
|
||||
cargo-binstall
|
||||
# Test that the installed binaries can be run
|
Loading…
Add table
Add a link
Reference in a new issue