From b2c126998e8f45951efa0c86db0961ce7d6a3865 Mon Sep 17 00:00:00 2001 From: ringsaturn Date: Fri, 23 Jun 2023 16:09:12 +0800 Subject: [PATCH] Add release --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..59a2ff3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "*.*.*" + release: + types: + - published + +env: + CARGO_TERM_COLOR: always + +jobs: + publish: + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/checkout@v3 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: nightly + - name: Cache + uses: Swatinem/rust-cache@v2 + - uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}