Skip to content

Commit

Permalink
feat: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
siketyan committed Nov 5, 2022
0 parents commit dcba9b3
Show file tree
Hide file tree
Showing 16 changed files with 1,677 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Rust

on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published

env:
CARGO_TERM_COLOR: always

jobs:
checks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt,clippy

- 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
with:
command: test
args: --all-features

deploy:
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'release' }}
needs:
- checks
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading

0 comments on commit dcba9b3

Please sign in to comment.