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