Skip to content

Merge pull request #4 from Liefland/dependabot/cargo/serde-1.0.197 #29

Merge pull request #4 from Liefland/dependabot/cargo/serde-1.0.197

Merge pull request #4 from Liefland/dependabot/cargo/serde-1.0.197 #29

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
tags: [ "release/v*" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -q -y && sudo apt-get upgrade -y
sudo apt-get install -y libxdo-dev libxkbcommon-dev
- name: Build (all features)
run: cargo build --all-features
- name: Build (no features)
run: cargo build --no-default-features
- name: Build (default)
run: cargo build
- name: Run tests
run: cargo test --verbose
- name: Cargo check
run: cargo check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
uses: giraffate/clippy-action@v1
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release/v')
needs: [build, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Authenticate
run: cargo login ${{ secrets.CARGO_PUBLISH_TOKEN }}
- name: Install Dependencies
run: |
sudo apt-get update -q -y && sudo apt-get upgrade -y
sudo apt-get install -y libxdo-dev libxkbcommon-dev
- name: Publish
run: cargo publish