From 5d55ec2315fba38f7644424ad013ab9871623d9b Mon Sep 17 00:00:00 2001 From: Mirah Gary Date: Mon, 19 Sep 2022 16:04:59 +0200 Subject: [PATCH] Publish to crates.io on tag. --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..134508c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: install 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 }}