Skip to content

Commit c231055

Browse files
committed
Auto-publish to create.io
Add a job in the release workflow for automatically publishing to crates.io Signed-off-by: Jason Rogena <jason@rogena.me>
1 parent 866de63 commit c231055

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,9 @@ jobs:
8888
with:
8989
files: target/lcov.info
9090
fail_ci_if_error: true
91+
- name: Check if can publish to crates.io
92+
uses: katyo/publish-crates@v1
93+
with:
94+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
95+
dry-run: true
96+
check-repo: false

.github/workflows/release.yml

+14
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,17 @@ jobs:
130130
asset_path: ${{ env.ASSET }}
131131
asset_name: ${{ env.ASSET }}
132132
asset_content_type: application/octet-stream
133+
134+
pubish-crates-io:
135+
name: pubish-crates-io
136+
runs-on: ubuntu-latest
137+
needs: ['create-release']
138+
steps:
139+
- uses: actions/checkout@v2
140+
- uses: actions-rs/toolchain@v1
141+
with:
142+
toolchain: stable
143+
override: true
144+
- uses: katyo/publish-crates@v1
145+
with:
146+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fs-librarian"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = ["Jason Rogena <jason@rogena.me>"]
55
edition = "2021"
66
rust-version = "1.61"

0 commit comments

Comments
 (0)