Skip to content

Upgrade to latest ribboncurls version fixing an escape bug #38

Upgrade to latest ribboncurls version fixing an escape bug

Upgrade to latest ribboncurls version fixing an escape bug #38

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
env:
CARGO_INCREMENTAL: 0
permissions:
contents: write
jobs:
setup-environment:
runs-on: ubuntu-latest
outputs:
cargo_version: ${{ steps.cargo_version.outputs.value }}
cargo_cache_key: ${{ steps.cargo_cache_key.outputs.value }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.ref }}
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set cargo cache key
id: cargo_cache_key
run: |
CARGO_CACHE_KEY="${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
echo "value=$CARGO_CACHE_KEY" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
~/.cargo/bin
key: ${{ steps.cargo_cache_key.outputs.value }}
id: cache-cargo-release
- name: Get Cargo version
id: cargo_version
run: |
VERSION=$(cargo read-manifest --manifest-path ./tinted-builder-rust/Cargo.toml | jq -r ".version")
echo "value=$VERSION" >> $GITHUB_OUTPUT
- name: Abort if there is a Cargo.toml and git tag mismatch
run: |
if [[ "v${{ steps.cargo_version.outputs.value }}" != "${{ github.ref_name }}" ]]; then
echo "There is a Cargo.toml version and git tag mismatch." && exit 1;
fi
lint:
needs: setup-environment
uses: ./.github/workflows/lint.yml
with:
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }}
check-msrv:
uses: ./.github/workflows/msrv.yml
test:
needs: setup-environment
uses: ./.github/workflows/test.yml
with:
cache-key: ${{ needs.setup-environment.outputs.cargo_cache_key }}
create-release:
needs: [check-msrv, lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
release:
needs: create-release
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: i686-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- os: macos-11
target: x86_64-apple-darwin
- os: macos-11
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tinted-builder-rust
manifest-path: tinted-builder-rust/Cargo.toml
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
checksum: sha256