Skip to content

Commit

Permalink
reuse github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jul 4, 2024
1 parent 245a2b1 commit fba3426
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
release:
types: [created]

name: Publish to crate

jobs:
publish:
name: Publish to cargo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- uses: Swatinem/rust-cache@v2

- run: cargo test

- uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches:
- main

pull_request: {}

name: Test

jobs:
build_and_test:
name: Test
runs-on: ubuntu-latest

permissions:
checks: write
contents: read
pull-requests: write

steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy

- uses: Swatinem/rust-cache@v2

- run: cargo run -- wd

- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

0 comments on commit fba3426

Please sign in to comment.