File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ tags :
4+ # runs every time a new tag is made
5+ - ' *'
6+
7+ name : Publish
8+
9+ jobs :
10+ crates_io_publish :
11+ name : Publish (crates.io)
12+
13+ runs-on : ubuntu-latest
14+ timeout-minutes : 10
15+ steps :
16+ - uses : actions/checkout@v3
17+ - uses : dtolnay/rust-toolchain@nightly
18+
19+ - name : cargo-release Cache
20+ id : cargo_release_cache
21+ uses : actions/cache@v3
22+ with :
23+ path : ~/.cargo/bin/cargo-release
24+ key : ${{ runner.os }}-cargo-release
25+
26+ - run : cargo install cargo-release
27+ if : steps.cargo_release_cache.outputs.cache-hit != 'true'
28+
29+ - name : cargo login
30+ run : cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
32+ # allow-branch HEAD is because GitHub actions switches
33+ # to the tag while building, which is a detached head
34+
35+ # Publishing is currently messy, because:
36+ #
37+ # * `peace_rt_model_core` exports `NativeError` or `WebError` depending on the target.
38+ # * `peace_rt_model_web` fails to build when publishing the workspace for a native target.
39+ # * `peace_rt_model_web` still needs its dependencies to be published before it can be
40+ # published.
41+ # * `peace_rt_model_hack` needs `peace_rt_model_web` to be published before it can be
42+ # published.
43+ #
44+ # We *could* pass through `--no-verify` so `cargo` doesn't build the crate before publishing,
45+ # which is reasonable, since this job only runs after the Linux, Windows, and WASM builds
46+ # have passed.
47+ - name : " cargo release publish"
48+ run : |-
49+ cargo release \
50+ publish \
51+ --workspace \
52+ --all-features \
53+ --allow-branch HEAD \
54+ --no-confirm \
55+ --no-verify \
56+ --execute
57+
You can’t perform that action at this time.
0 commit comments