Skip to content

Commit f2a55e5

Browse files
committed
chore: publish using trusted publishing
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 250649a commit f2a55e5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
name: Publish crate
11+
runs-on: ubuntu-latest
12+
environment: release
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Authenticate with crates.io
18+
uses: rust-lang/crates-io-auth-action@v1
19+
id: auth
20+
- name: Publish to crates.io
21+
run: cargo publish -p backon
22+
env:
23+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)