From b530197b3e3fcad32034f9e96128da174901177d Mon Sep 17 00:00:00 2001 From: cavivie Date: Wed, 10 Apr 2024 14:45:44 +0800 Subject: [PATCH] feat(ci): automatically publish to crates.io when tag is created --- .github/workflows/publish.yml | 15 +++++++++++++++ 1 file changed, 15 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..9097444 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,15 @@ +on: + push: + tags: + - '*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Publish to crates.io + run: | + cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}