Merge pull request #190 from siketyan/renovate/serde_json-1.x-lockfile #574
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: Rust | |
on: | |
push: ~ | |
release: | |
types: | |
- published | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
checks: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-v1-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --workspace --verbose | |
deploy: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event_name == 'release' }} | |
needs: | |
- checks | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-v1-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Log into crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: login | |
args: ${{ secrets.CRATES_IO_TOKEN }} | |
- name: Publish to crates.io (freee) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --verbose --allow-dirty -p freee | |
- name: Publish to crates.io (freee-hr) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --verbose --allow-dirty -p freee-hr |