mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-05 20:50:27 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5df67a7818 | ||
|
|
6a64a6dede | ||
|
|
6135833927 | ||
|
|
fb7c739bcd |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
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.0,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2,wasmtime@0.33.0
|
||||
- cargo-hack@0.5.12,cargo-llvm-cov@0.2.0,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2,wasmtime@0.34.0
|
||||
include:
|
||||
- os: macos-10.15
|
||||
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,wasm-pack,wasmtime
|
||||
|
||||
@@ -10,6 +10,10 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.1.5] - 2022-02-08
|
||||
|
||||
- Update `wasmtime@latest` to 0.34.0.
|
||||
|
||||
## [1.1.4] - 2022-02-06
|
||||
|
||||
- Update `cargo-llvm-cov@latest` to 0.2.0.
|
||||
@@ -49,7 +53,8 @@ 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.4...HEAD
|
||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.1.5...HEAD
|
||||
[1.1.5]: https://github.com/taiki-e/install-action/compare/v1.1.4...v1.1.5
|
||||
[1.1.4]: https://github.com/taiki-e/install-action/compare/v1.1.3...v1.1.4
|
||||
[1.1.3]: https://github.com/taiki-e/install-action/compare/v1.1.2...v1.1.3
|
||||
[1.1.2]: https://github.com/taiki-e/install-action/compare/v1.1.1...v1.1.2
|
||||
|
||||
@@ -70,7 +70,7 @@ https://spdx.org/licenses
|
||||
| [**cargo-llvm-cov**](https://github.com/taiki-e/cargo-llvm-cov) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-llvm-cov/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-MIT) |
|
||||
| [**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/rust-embedded/cross) | `~/.cargo/bin` | [GitHub Releases](https://github.com/rust-embedded/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rust-embedded/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rust-embedded/cross/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) |
|
||||
| [**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) |
|
||||
|
||||
6
main.sh
6
main.sh
@@ -81,9 +81,9 @@ for tool in "${tools[@]}"; do
|
||||
| tar xzf - -C ~/.cargo/bin
|
||||
;;
|
||||
cross)
|
||||
# https://github.com/rust-embedded/cross/releases
|
||||
# https://github.com/cross-rs/cross/releases
|
||||
latest_version="0.2.1"
|
||||
repo="rust-embedded/cross"
|
||||
repo="cross-rs/cross"
|
||||
case "${OSTYPE}" in
|
||||
linux*) target="x86_64-unknown-linux-musl" ;;
|
||||
darwin*) target="x86_64-apple-darwin" ;;
|
||||
@@ -164,7 +164,7 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
wasmtime)
|
||||
# https://github.com/bytecodealliance/wasmtime/releases
|
||||
latest_version="0.33.0"
|
||||
latest_version="0.34.0"
|
||||
repo="bytecodealliance/wasmtime"
|
||||
case "${OSTYPE}" in
|
||||
linux*) target="x86_64-linux" ;;
|
||||
|
||||
@@ -30,23 +30,40 @@ fi
|
||||
git diff --exit-code
|
||||
git diff --exit-code --staged
|
||||
|
||||
# Make sure the same release has not been created in the past.
|
||||
if gh release view "${tag}" &>/dev/null; then
|
||||
bail "tag '${tag}' has already been created and pushed"
|
||||
fi
|
||||
|
||||
release_date=$(date --utc '+%Y-%m-%d')
|
||||
if grep <CHANGELOG.md -E "^## \\[${version//./\\.}\\] - ${release_date}$" >/dev/null; then
|
||||
bail "release ${version} already exist in CHANGELOG.md"
|
||||
fi
|
||||
if grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
|
||||
bail "link to ${version} already exist in CHANGELOG.md"
|
||||
fi
|
||||
|
||||
remote_url=$(grep -E '^\[Unreleased\]: https://' CHANGELOG.md | sed 's/^\[Unreleased\]: //' | sed 's/\.\.\.HEAD$//')
|
||||
before_tag=$(sed <<<"${remote_url}" 's/^.*\/compare\///')
|
||||
remote_url=$(sed <<<"${remote_url}" 's/\/compare\/v.*$//')
|
||||
|
||||
sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n## [${version}] - ${release_date}/" CHANGELOG.md
|
||||
sed -i "s#^\[Unreleased\]: https://.*#[Unreleased]: ${remote_url}/compare/v${version}...HEAD\\n[${version}]: ${remote_url}/compare/${before_tag}...v${version}#" CHANGELOG.md
|
||||
if ! grep <CHANGELOG.md -E "^## \\[${version//./\\.}\\] - ${release_date}$" >/dev/null; then
|
||||
bail "failed to update CHANGELOG.md"
|
||||
fi
|
||||
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
|
||||
bail "failed to update CHANGELOG.md"
|
||||
fi
|
||||
|
||||
# Make sure that a valid release note for this version exists.
|
||||
# https://github.com/taiki-e/parse-changelog
|
||||
echo "============== CHANGELOG =============="
|
||||
parse-changelog CHANGELOG.md "${version}"
|
||||
echo "======================================="
|
||||
|
||||
if ! grep <CHANGELOG.md -E "^## \\[${version//./\\.}\\] - $(date --utc '+%Y-%m-%d')$" >/dev/null; then
|
||||
bail "not found section '[${version}] - $(date --utc '+%Y-%m-%d')' in CHANGELOG.md"
|
||||
fi
|
||||
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
|
||||
bail "not found link to [${version}] in CHANGELOG.md"
|
||||
fi
|
||||
|
||||
# Make sure the same release has not been created in the past.
|
||||
if gh release view "${tag}" &>/dev/null; then
|
||||
bail "tag '${tag}' has already been created and pushed"
|
||||
fi
|
||||
git add CHANGELOG.md
|
||||
git commit -m "Release ${version}"
|
||||
|
||||
tools=(
|
||||
cargo-hack
|
||||
|
||||
Reference in New Issue
Block a user