Skip to content

Commit dee64f4

Browse files
committed
Added Crates.io publish
1 parent 248e33e commit dee64f4

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and Release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
tags:
88
- "v*"
99

.github/workflows/publish.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
# Step 3: Install Rust
17+
- name: Set up Rust
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
profile: minimal
22+
23+
- name: Deploy to crates.io
24+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
25+
run: cargo publish
26+
env:
27+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}

0 commit comments

Comments
 (0)