Skip to content

Commit c44587d

Browse files
committed
CI: Add crates.io publication job on release
1 parent e9777cc commit c44587d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ env:
77
REGISTRY: ghcr.io
88
IMAGE_NAME: ${{ github.repository }}
99
jobs:
10+
publish-crate:
11+
name: Publish crate to crates.io
12+
runs-on: ubuntu-latest
13+
permissions: {}
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v3
17+
18+
- name: Install stable toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: 1.66.1
23+
override: true
24+
25+
- name: Publish crate to crates.io
26+
run: cargo publish --token ${CRATES_TOKEN}
27+
env:
28+
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
29+
1030
build-and-push-image:
1131
name: Build and publish a Docker image
1232
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)