bump #1868
Workflow file for this run
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: Cargo | |
on: | |
- push | |
- pull_request | |
env: | |
RUST_LOG: debug | |
CARGO_INCREMENTAL: 0 | |
CI: "1" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
name: Test - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Handle line endings | |
shell: bash | |
if: runner.os == 'Windows' | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setupz node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
- name: Configure path (windows) | |
shell: bash | |
if: runner.os == 'Windows' | |
run: | | |
echo 'C:\\npm\\prefix' >> $GITHUB_PATH | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "cargo-test" | |
cache-on-failure: true | |
- name: Run cargo test | |
run: | | |
cargo test --all --color always | |
publish: | |
name: "Publish" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: | |
- test | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: true | |
- name: Install cargo-mono | |
uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-mono | |
version: "0.4.1" | |
locked: true | |
- name: Publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: | | |
cargo mono publish --no-verify |