Skip to content

Commit 3666fd7

Browse files
committed
Adds publish workflow
1 parent 9f94ac3 commit 3666fd7

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Publish Desktop Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: write
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
14+
jobs:
15+
publish-crate:
16+
name: Publish to crates.io
17+
needs: release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Rust
23+
uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: stable
26+
override: true
27+
28+
- name: Build Release Binary
29+
run: |
30+
cargo build --release
31+
32+
- name: Publish to crates.io
33+
uses: katyo/publish-crates@v2
34+
with:
35+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 commit comments

Comments
 (0)