summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorcyqsimon <28627918+cyqsimon@users.noreply.github.com>2023-09-19 17:33:21 +0800
committercyqsimon <28627918+cyqsimon@users.noreply.github.com>2023-09-19 17:33:21 +0800
commit94bbb43faf429f19625cebcf711674fd5b181b2b (patch)
tree21dc85af116997d258da26212b1454e6bae24054 /.github
parenteba356220cc06254b96cd3241bc80ab7a0ab017b (diff)
Add `publish crate` workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/publish-crate.yaml24
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/publish-crate.yaml b/.github/workflows/publish-crate.yaml
new file mode 100644
index 0000000..048ecc2
--- /dev/null
+++ b/.github/workflows/publish-crate.yaml
@@ -0,0 +1,24 @@
+name: publish-crate
+on:
+ release:
+ types:
+ - released
+ workflow_dispatch:
+
+jobs:
+ publish-to-crates-io:
+ name: Publish to crates.io
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: stable
+
+ - name: Run cargo publish
+ uses: katyo/publish-crates@v2
+ with:
+ registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}