Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
ci(release): publish on crates.io on release (#50)
Browse files Browse the repository at this point in the history
* ci(release): setup protoc before publishing
  • Loading branch information
clearloop committed Aug 31, 2022
1 parent 35bce5b commit f53876b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v1

- uses: Swatinem/rust-cache@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
Expand All @@ -42,14 +42,14 @@ jobs:
profile: minimal
toolchain: stable
components: clippy

- name: Install Protoc
uses: arduino/setup-protoc@v1

- uses: Swatinem/rust-cache@v2

- name: Check code format
run: cargo fmt --check

- name: Run cargo clippy
run: cargo clippy --all --all-features
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
release:
types: [ released ]

jobs:
publish:
name: Publish new version on crate.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Publish
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: |
cargo login "$CRATES_IO_TOKEN"
cargo publish -v --all-features

0 comments on commit f53876b

Please sign in to comment.