Skip to content

fix: test in README

fix: test in README #7

Workflow file for this run

name: Release
on:
push:
branches: [release]
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract version
id: extract-version
run: echo "VERSION=$(grep -oP '^version = "\K[^"]+' Cargo.toml | awk '{$1=$1;print}')" >> $GITHUB_OUTPUT
- name: Cache restore
uses: actions/cache/restore@v3
id: cache-cargo-restore
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ steps.extract-version.outputs.VERSION }}
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Run all tests with default features
run: cargo test
- name: Run tests with all features
run: cargo test --all-features
- name: publish crates
uses: katyo/publish-crates@v2
with:
# crates.io registry token
registry-token: ${{ secrets.crates_io }}
- name: Create Tag
uses: actions/github-script@v6
with:
script: |
const {VERSION} = process.env
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/v${VERSION}`,
sha: context.sha
})