From 721eaa7d013369f51b883ddce36bac59c2c283c4 Mon Sep 17 00:00:00 2001 From: red Date: Sun, 7 Feb 2021 18:39:41 +0100 Subject: [PATCH] update ci added automatic release pipeline --- .github/workflows/ci.yml | 9 ++++++--- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fe4001..3f681b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,14 @@ jobs: name: Rust project runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - name: Checkout source + uses: actions/checkout@v2 + - name: Get Rust + uses: actions-rs/toolchain@v1 with: toolchain: stable - - uses: actions-rs/cargo@v1 + - name: Cargo Build + uses: actions-rs/cargo@v1 with: command: build args: --release --all-features \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..447f759 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: CI + +on: [release] + +jobs: + build_and_test: + name: Rust project + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v2 + - name: Get Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Cargo Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features + - name: Cargo Login + uses: actions-rs/cargo@v1 + with: + command: login + args: ${{ secrets.CARGO_TOKEN }} + - name: Cargo Publish + uses: actions-rs/cargo@v1 + with: + command: publish \ No newline at end of file