Compare commits

...

13 Commits

Author SHA1 Message Date
Taiki Endo
c28a9b2f8c Release 1.2.2 2022-03-19 02:27:31 +09:00
Taiki Endo
d334ea4167 Update changelog 2022-03-19 02:27:25 +09:00
Rain
535250de6e for nextest action, use version in URL 2022-03-19 02:22:37 +09:00
Taiki Endo
c5927f82cd Release 1.2.1 2022-03-19 00:50:40 +09:00
Taiki Endo
f06ff66739 Update cargo-llvm-cov to 0.2.4 2022-03-19 00:45:08 +09:00
Taiki Endo
9983065757 Release 1.2.0 2022-03-19 00:00:26 +09:00
Taiki Endo
92f66cb09d Support nextest 2022-03-18 23:59:52 +09:00
Taiki Endo
af68e07c71 Release 1.1.9 2022-03-10 12:55:08 +09:00
Taiki Endo
c94ae05707 Update wasmtime to 0.35.1 2022-03-10 12:52:37 +09:00
Taiki Endo
374e0c54c9 Update actions/checkout action to v3 2022-03-09 23:54:49 +09:00
Taiki Endo
2e762384e0 Update wasmtime to 0.35.0 2022-03-09 23:54:42 +09:00
Taiki Endo
038c2c6c1b Release 1.1.8 2022-03-05 20:11:47 +09:00
Taiki Endo
e50d40cb78 Update cargo-llvm-cov to 0.2.3 2022-03-05 20:09:55 +09:00
6 changed files with 63 additions and 15 deletions

View File

@@ -27,16 +27,18 @@ jobs:
- ubuntu-20.04
tool:
# Note: Specifying the version of valgrind and wasm-pack is not supported.
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,valgrind,wasm-pack,wasmtime
- cargo-hack@0.5.12,cargo-llvm-cov@0.2.2,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.3,wasmtime@0.34.0
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,shellcheck,shfmt,valgrind,wasm-pack,wasmtime
- cargo-hack@0.5.12,cargo-llvm-cov@0.2.4,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,nextest@0.9.11,shellcheck@0.8.0,shfmt@3.4.3,wasmtime@0.35.1
# Nextest supports basic version ranges as well
- nextest@0.9
include:
- os: macos-10.15
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,wasm-pack,wasmtime
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest,shellcheck,shfmt,wasm-pack,wasmtime
- os: windows-2019
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,nextest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./
@@ -46,7 +48,7 @@ jobs:
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: taiki-e/install-action@shellcheck

View File

@@ -18,7 +18,7 @@ jobs:
if: github.repository_owner == 'taiki-e'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: taiki-e/create-gh-release-action@v1

View File

@@ -10,6 +10,26 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [1.2.2] - 2022-03-18
- Support specifying the version of `nextest`. ([#2](https://github.com/taiki-e/install-action/pull/3), thanks @sunshowers)
## [1.2.1] - 2022-03-18
- Update `cargo-llvm-cov@latest` to 0.2.4.
## [1.2.0] - 2022-03-18
- Support `nextest`.
## [1.1.9] - 2022-03-10
- Update `wasmtime@latest` to 0.35.1.
## [1.1.8] - 2022-03-05
- Update `cargo-llvm-cov@latest` to 0.2.3.
## [1.1.7] - 2022-03-02
- Update `cargo-llvm-cov@latest` to 0.2.2.
@@ -62,7 +82,12 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.1.7...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.2.2...HEAD
[1.2.2]: https://github.com/taiki-e/install-action/compare/v1.2.1...v1.2.2
[1.2.1]: https://github.com/taiki-e/install-action/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/taiki-e/install-action/compare/v1.1.9...v1.2.0
[1.1.9]: https://github.com/taiki-e/install-action/compare/v1.1.8...v1.1.9
[1.1.8]: https://github.com/taiki-e/install-action/compare/v1.1.7...v1.1.8
[1.1.7]: https://github.com/taiki-e/install-action/compare/v1.1.6...v1.1.7
[1.1.6]: https://github.com/taiki-e/install-action/compare/v1.1.5...v1.1.6
[1.1.5]: https://github.com/taiki-e/install-action/compare/v1.1.4...v1.1.5

View File

@@ -71,6 +71,7 @@ https://spdx.org/licenses
| [**cargo-minimal-versions**](https://github.com/taiki-e/cargo-minimal-versions) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-minimal-versions/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-MIT) |
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-MIT) |
| [**cross**](https://github.com/cross-rs/cross) | `~/.cargo/bin` | [GitHub Releases](https://github.com/cross-rs/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-MIT) |
| [**nextest**](https://github.com/nextest-rs/nextest) | `~/.cargo/bin` | [GitHub Releases](https://github.com/nextest-rs/nextest/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/nextest-rs/nextest/blob/HEAD/LICENSE-MIT) |
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS | [GPL-3.0-or-later](https://github.com/koalaman/shellcheck/blob/HEAD/LICENSE) |
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS | [BSD-3-Clause](https://github.com/mvdan/sh/blob/HEAD/LICENSE) |
| [**valgrind**](https://valgrind.org) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0-or-later](https://valgrind.org/docs/manual/license.gpl.html) |

27
main.sh
View File

@@ -59,7 +59,7 @@ for tool in "${tools[@]}"; do
# https://github.com/taiki-e/cargo-hack/releases
cargo-hack) latest_version="0.5.12" ;;
# https://github.com/taiki-e/cargo-llvm-cov/releases
cargo-llvm-cov) latest_version="0.2.2" ;;
cargo-llvm-cov) latest_version="0.2.4" ;;
# https://github.com/taiki-e/cargo-minimal-versions/releases
cargo-minimal-versions) latest_version="0.1.3" ;;
# https://github.com/taiki-e/parse-changelog/releases
@@ -77,8 +77,9 @@ for tool in "${tools[@]}"; do
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/${tool}-${target}.tar.gz"
# shellcheck disable=SC2086
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ~/.cargo/bin
| tar xzf - -C ${CARGO_HOME:-~/.cargo}/bin
;;
cross)
# https://github.com/cross-rs/cross/releases
@@ -94,8 +95,21 @@ for tool in "${tools[@]}"; do
latest) version="${latest_version}" ;;
esac
url="https://github.com/${repo}/releases/download/v${version}/cross-v${version}-${target}.tar.gz"
# shellcheck disable=SC2086
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ~/.cargo/bin
| tar xzf - -C ${CARGO_HOME:-~/.cargo}/bin
;;
nextest)
# https://nexte.st/book/pre-built-binaries.html
case "${OSTYPE}" in
linux*) url="https://get.nexte.st/${version}/linux" ;;
darwin*) url="https://get.nexte.st/${version}/mac" ;;
cygwin* | msys*) url="https://get.nexte.st/${version}/windows-tar" ;;
*) bail "unsupported OSTYPE '${OSTYPE}' for ${tool}" ;;
esac
# shellcheck disable=SC2086
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xzf - -C ${CARGO_HOME:-~/.cargo}/bin
;;
shellcheck)
# https://github.com/koalaman/shellcheck/releases
@@ -164,7 +178,7 @@ for tool in "${tools[@]}"; do
;;
wasmtime)
# https://github.com/bytecodealliance/wasmtime/releases
latest_version="0.34.0"
latest_version="0.35.1"
repo="bytecodealliance/wasmtime"
case "${OSTYPE}" in
linux*) target="x86_64-linux" ;;
@@ -176,15 +190,16 @@ for tool in "${tools[@]}"; do
latest) version="${latest_version}" ;;
esac
url="https://github.com/bytecodealliance/wasmtime/releases/download/v${version}/wasmtime-v${version}-${target}.tar.xz"
# shellcheck disable=SC2086
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 --retry-connrefused "${url}" \
| tar xJf - --strip-components 1 -C ~/.cargo/bin "wasmtime-v${version}-${target}/wasmtime"
| tar xJf - --strip-components 1 -C ${CARGO_HOME:-~/.cargo}/bin "wasmtime-v${version}-${target}/wasmtime"
;;
*) bail "unsupported tool '${tool}'" ;;
esac
info "${tool} installed at $(type -P "${tool}")"
case "${tool}" in
cargo-*) x cargo "${tool#cargo-}" --version ;;
cargo-* | nextest) x cargo "${tool#cargo-}" --version ;;
*) x "${tool}" --version ;;
esac
echo

View File

@@ -66,6 +66,10 @@ echo "============== CHANGELOG =============="
parse-changelog CHANGELOG.md "${version}"
echo "======================================="
if ! git branch | grep -q '\* main'; then
bail "current branch is not 'main'"
fi
if [[ -n "${tags}" ]]; then
# Create a release commit.
git add CHANGELOG.md
@@ -78,6 +82,7 @@ tools=(
cargo-minimal-versions
parse-changelog
cross
nextest
shellcheck
shfmt
valgrind
@@ -88,8 +93,8 @@ tools=(
(
set -x
git push origin main
git tag "${tag}"
git push origin main
git push origin --tags
version_tag="v${version%%.*}"