|
18 | 18 |
|
19 | 19 | permissions: |
20 | 20 | contents: read |
| 21 | + id-token: write |
21 | 22 |
|
22 | 23 | jobs: |
23 | 24 | publish-hyperlight-packages: |
|
34 | 35 | - uses: hyperlight-dev/ci-setup-workflow@v1.8.0 |
35 | 36 | with: |
36 | 37 | rust-toolchain: "1.89" |
| 38 | + |
37 | 39 | - name: Check crate versions |
38 | 40 | shell: bash |
39 | 41 | run: | |
@@ -76,60 +78,64 @@ jobs: |
76 | 78 | needs_publish hyperlight-host |
77 | 79 | needs_publish hyperlight-guest-tracing |
78 | 80 |
|
| 81 | + - name: Authenticate with crates.io |
| 82 | + uses: rust-lang/crates-io-auth-action@v1 |
| 83 | + id: crates-io-auth |
| 84 | + |
79 | 85 | - name: Publish hyperlight-common |
80 | 86 | continue-on-error: ${{ inputs.dry_run }} |
81 | 87 | run: cargo publish --manifest-path ./src/hyperlight_common/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
82 | 88 | env: |
83 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 89 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
84 | 90 | if: env.PUBLISH_HYPERLIGHT_COMMON != 'false' |
85 | 91 |
|
86 | 92 | - name: Publish hyperlight-guest-tracing |
87 | 93 | continue-on-error: ${{ inputs.dry_run }} |
88 | 94 | run: cargo publish --manifest-path ./src/hyperlight_guest_tracing/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
89 | 95 | env: |
90 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 96 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
91 | 97 | if: env.PUBLISH_HYPERLIGHT_GUEST_TRACING != 'false' |
92 | 98 |
|
93 | 99 | - name: Publish hyperlight-guest |
94 | 100 | continue-on-error: ${{ inputs.dry_run }} |
95 | 101 | run: cargo publish --manifest-path ./src/hyperlight_guest/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
96 | 102 | env: |
97 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 103 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
98 | 104 | if: env.PUBLISH_HYPERLIGHT_GUEST != 'false' |
99 | 105 |
|
100 | 106 | - name: Publish hyperlight-guest-macro |
101 | 107 | continue-on-error: ${{ inputs.dry_run }} |
102 | 108 | run: cargo publish --manifest-path ./src/hyperlight_guest_macro/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
103 | 109 | env: |
104 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 110 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
105 | 111 | if: env.PUBLISH_HYPERLIGHT_GUEST_MACRO != 'false' |
106 | 112 |
|
107 | 113 | - name: Publish hyperlight-guest-bin |
108 | 114 | continue-on-error: ${{ inputs.dry_run }} |
109 | 115 | run: cargo publish --manifest-path ./src/hyperlight_guest_bin/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
110 | 116 | env: |
111 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 117 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
112 | 118 | if: env.PUBLISH_HYPERLIGHT_GUEST_BIN != 'false' |
113 | 119 |
|
114 | 120 | - name: Publish hyperlight-component-util |
115 | 121 | continue-on-error: ${{ inputs.dry_run }} |
116 | 122 | run: cargo publish --manifest-path ./src/hyperlight_component_util/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
117 | 123 | env: |
118 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 124 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
119 | 125 | if: env.PUBLISH_HYPERLIGHT_COMPONENT_UTIL != 'false' |
120 | 126 |
|
121 | 127 | - name: Publish hyperlight-component-macro |
122 | 128 | continue-on-error: ${{ inputs.dry_run }} |
123 | 129 | run: cargo publish --manifest-path ./src/hyperlight_component_macro/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
124 | 130 | env: |
125 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 131 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
126 | 132 | if: env.PUBLISH_HYPERLIGHT_COMPONENT_MACRO != 'false' |
127 | 133 |
|
128 | 134 | - name: Publish hyperlight-host |
129 | 135 | continue-on-error: ${{ inputs.dry_run }} |
130 | 136 | run: cargo publish --manifest-path ./src/hyperlight_host/Cargo.toml ${{ inputs.dry_run && '--dry-run' || '' }} |
131 | 137 | env: |
132 | | - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} |
| 138 | + CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} |
133 | 139 | if: env.PUBLISH_HYPERLIGHT_HOST != 'false' |
134 | 140 |
|
135 | 141 |
|
|
0 commit comments