From dc07aea203daf3681c882bb39f4f3fd2ac6dc849 Mon Sep 17 00:00:00 2001 From: Navid Yaghoobi Date: Sun, 30 Jun 2024 18:40:00 +1000 Subject: [PATCH] ghaction update Signed-off-by: Navid Yaghoobi --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5ba8495 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +--- + name: Publish + + on: + push: + tags: + - 'v*' + branches: + - main + + workflow_dispatch: + + jobs: + publish_crate: + name: Publish crate + runs-on: 'ubuntu-latest' + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo publish --token ${CRATES_TOKEN} + env: + CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}