Skip to content

Commit

Permalink
Add publish workflow and minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-h-chamberlain committed Oct 11, 2020
1 parent 74066b8 commit 4c9a3ce
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ jobs:
steps:
- name: Checkout branch
uses: actions/checkout@v2

- name: Setup default Rust toolchain
uses: actions-rs/toolchain@v1
with:
components: clippy,rustfmt
toolchain: stable

- name: Check formatting
run: cargo fmt --all --verbose -- --check

- name: Run clippy linting
run: cargo clippy --color=always --workspace --verbose --all-targets
env:
Expand All @@ -42,9 +46,11 @@ jobs:
steps:
- name: Checkout branch
uses: actions/checkout@v2

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}

- name: Build and run tests
run: cargo test --color=always --workspace
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: publish

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup default Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install cargo-workspaces
uses: actions-rs/[email protected]
with:
crate: cargo-workspaces

- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo workspaces publish --yes --from-git --allow-branch develop

0 comments on commit 4c9a3ce

Please sign in to comment.