add publish on tags job

This commit is contained in:
Anton Suprunchuk
2021-10-08 10:27:07 +03:00
parent ded50a7c25
commit 708d9e1a50
2 changed files with 26 additions and 2 deletions

24
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Publish
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run tests
run: cargo test
- shell: bash
env:
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: cargo login "$CARGO_TOKEN" && cargo publish

View File

@@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust Toolchain
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build and test
- name: Run tests
run: cargo test