Skip to content

Commit

Permalink
Publish releases on crates.io (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
mre authored Dec 4, 2020
1 parent b7ab4ab commit 3401999
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
lints:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -37,3 +38,42 @@ jobs:
with:
command: clippy
args: -- -D warnings

publish-check:
name: Publish Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: cargo publish check
uses: actions-rs/cargo@v1
with:
command: publish
args: --dry-run

publish:
if: startsWith(github.ref, 'refs/tags/')
needs:
- test
- lint
- publish-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: cargo publish
uses: actions-rs/cargo@v1
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
with:
command: publish

0 comments on commit 3401999

Please sign in to comment.