Skip to content

Merge pull request #25 from siketyan/renovate/base64-0.x #96

Merge pull request #25 from siketyan/renovate/base64-0.x

Merge pull request #25 from siketyan/renovate/base64-0.x #96

Workflow file for this run

name: Rust
on:
push: ~
release:
types:
- published
env:
CARGO_TERM_COLOR: always
jobs:
checks:
strategy:
matrix:
os:
- windows-2022
- macos-12
- ubuntu-22.04
include:
- os: windows-2022
tests: true
- os: macos-12
tests: false # Keychain requires user interaction, not able to test on CI
- os: ubuntu-22.04
tests: false # Keychain requires user interaction, not able to test on CI
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/cache@v3
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
components: rustfmt,clippy
- name: Authenticate gh CLI
run: echo "${{ github.token }}" | gh auth login --with-token --secure-storage --hostname "github.com" --git-protocol "https"
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ github.token }}
args: --all-features
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- name: Run tests
uses: actions-rs/cargo@v1
if: '${{ matrix.tests }}'
with:
command: test
args: --all-features
deploy:
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'release' }}
needs:
- checks
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-v1-${{ hashFiles('**/Cargo.toml') }}
- 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
uses: actions-rs/cargo@v1
with:
command: publish
args: --allow-dirty