version: 0.3.1 -> 0.3.1-dev #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: {} | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: docker pull yshavit/mdq | |
- name: find version mentioned in readme | |
id: readme-version | |
run: | | |
set -euo pipefail | |
readme_version="$(cat README.md | docker run -i --rm yshavit/mdq '# Development | P: "Requires rustc >=" ' | awk '{print $NF}')" | |
echo "result=$readme_version" >> "$GITHUB_OUTPUT" | |
- name: pull cargo-msrv from docker hub | |
run: docker pull foresterre/cargo-msrv | |
- name: find minimum supported rust version | |
id: run-msrv | |
run: | | |
set -euo pipefail | |
min_version="$(docker run --rm -t -v "$PWD/":/app/ foresterre/cargo-msrv find --no-log --output-format minimal | tr -d $'\r\n')" | |
echo "result=$min_version" >> "$GITHUB_OUTPUT" | |
- name: compare versions | |
run: | | |
echo "::notice title=cargo-msrv::$MSRV_VERSION" | |
echo "::notice title=README.md-msrv::$README_VERSION" | |
if [[ "$MSRV_VERSION" != "$README_VERSION" ]]; then | |
echo "::error title=msrv-mismatch::cargo-msrv was $MSRV_VERSION but README.md says rustc >= $README_VERSION" | |
exit 1 | |
fi | |
env: | |
MSRV_VERSION: ${{ steps.run-msrv.outputs.result }} | |
README_VERSION: ${{ steps.readme-version.outputs.result }} |