|
1 | 1 | # TODO: use this once alloy-rpc is on crates.io |
2 | 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 |
59 | | - |
| 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 |
0 commit comments