Skip to content

Commit 645e5e8

Browse files
bors[bot]toasteater
andauthored
Merge #671
671: Add workflow for publishing on crates.io r=halzy a=toasteater The workflow triggers on tag pushes, and must be approved by an organization member with push access. Once approved, the workflow will try publishing the crates in the correct order to crates.io @godot-rust/bindings Thoughts? This should make the publishing process a tiny bit easier for future releases. The chances for the token to get compromised *should* be small enough to make this worth the drawback, imo. Co-authored-by: toasteater <[email protected]>
2 parents 6500d4a + 3daf960 commit 645e5e8

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
branches:
6+
- '!*'
7+
tags:
8+
- '*'
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
environment: Deploy
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
21+
with:
22+
profile: minimal
23+
toolchain: stable
24+
components: rustfmt, clippy
25+
- name: Sanity tests
26+
run: |
27+
cargo fmt --all -- --check;
28+
cargo clippy --all --all-features -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented;
29+
cargo test --all --all-features;
30+
- name: Publishing to crates.io
31+
env:
32+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
33+
run: |
34+
(cd impl/proc_macros && cargo publish);
35+
(cd gdnative-sys && cargo publish);
36+
(cd gdnative-derive && cargo publish);
37+
(cd gdnative-core && cargo publish);
38+
(cd bindings_generator && cargo publish);
39+
(cd gdnative-bindings && cargo publish);
40+
(cd gdnative && cargo publish);

0 commit comments

Comments
 (0)