|
4 | 4 | release: |
5 | 5 | types: [published] |
6 | 6 | workflow_dispatch: |
7 | | - # "Manually publish release" |
8 | | - inputs: |
9 | | - opentelemetry: |
10 | | - description: "Publish pyo3-opentelemetry" |
11 | | - type: boolean |
12 | | - default: false |
13 | | - opentelemetry_macros: |
14 | | - description: "Publish pyo3-opentelemetry-macros" |
15 | | - type: boolean |
16 | | - default: false |
17 | | - tracing_subscriber: |
18 | | - description: "Publish pyo3-tracing-subscriber" |
19 | | - type: boolean |
20 | | - default: false |
21 | 7 |
|
22 | 8 | jobs: |
23 | | - opentelemetry: |
| 9 | + cargo-publish: |
24 | 10 | runs-on: ubuntu-latest |
25 | 11 | if: | |
26 | | - ${{ (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'opentelemetry/v')) |
27 | | - || (github.event_name == 'workflow_dispatch' && inputs.opentelemetry) }} |
| 12 | + ${{ (github.event_name == 'release') |
| 13 | + || (github.event_name == 'workflow_dispatch') }} |
28 | 14 | steps: |
29 | 15 | - uses: actions/checkout@v5 |
30 | 16 | - uses: Swatinem/rust-cache@v2 |
31 | | - # Below we give some time to make sure that the macros crate is published before the lib crate |
32 | | - # in the case that the new lib crate depends on the new, yet to be published macros crate. |
33 | | - - run: timeout 15m bash -c 'until ./scripts/ci/assert-macros-crate-published.sh; do sleep 10; done' |
34 | | - - run: cargo publish -p pyo3-opentelemetry --locked --token ${{ secrets.CRATES_IO_TOKEN }} |
35 | | - |
36 | | - opentelemetry-macros: |
37 | | - runs-on: ubuntu-latest |
38 | | - if: | |
39 | | - ${{ (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'opentelemetry-macros/v')) |
40 | | - || (github.event_name == 'workflow_dispatch' && inputs.opentelemetry_macros) }} |
41 | | - steps: |
42 | | - - uses: actions/checkout@v5 |
43 | | - - uses: Swatinem/rust-cache@v2 |
44 | | - - run: cargo publish -p pyo3-opentelemetry-macros --locked --token ${{ secrets.CRATES_IO_TOKEN }} |
45 | | - |
46 | | - tracing-subscriber: |
47 | | - runs-on: ubuntu-latest |
48 | | - if: | |
49 | | - ${{ (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'tracing-subscriber/v')) |
50 | | - || (github.event_name == 'workflow_dispatch' && inputs.tracing_subscriber) }} |
51 | | - steps: |
52 | | - - uses: actions/checkout@v5 |
53 | | - - uses: Swatinem/rust-cache@v2 |
54 | | - - run: cargo publish -p pyo3-tracing-subscriber --locked --token ${{ secrets.CRATES_IO_TOKEN }} |
55 | | - |
| 17 | + - run: cargo publish --workspace --locked --token ${{ secrets.CRATES_IO_TOKEN }} |
0 commit comments