@@ -210,24 +210,21 @@ jobs:
210210 - name : Checkout release tag
211211 uses : actions/checkout@v4
212212
213- - name : Install stable toolchain
214- uses : actions-rs/toolchain@v1
215- with :
216- profile : minimal
217- toolchain : stable
218- override : true
219-
220- - name : Install protoc
221- uses : arduino/setup-protoc@v3
222- with :
223- repo-token : ${{ secrets.GITHUB_TOKEN }}
213+ - name : Set up Docker Buildx
214+ uses : docker/setup-buildx-action@v3
224215
225- - name : Cargo login
226- run : cargo login ${{ secrets.CRATES_IO_TOKEN }}
216+ - name : Write crates.io token to file
217+ run : |
218+ echo "${{ secrets.CRATES_IO_TOKEN }}" > /tmp/crates_io_token.txt
227219
228- - name : Publish to crates.io
229- working-directory : confidence-resolver
230- run : cargo publish
220+ - name : Publish confidence-resolver with Docker
221+ uses : docker/build-push-action@v6
222+ with :
223+ context : .
224+ target : confidence-resolver.publish
225+ cache-from : type=registry,ref=ghcr.io/${{ github.repository }}/cache:main
226+ secret-files : |
227+ crates_io_token=/tmp/crates_io_token.txt
231228
232229 publish-rust-provider-release :
233230 needs : [release, publish-confidence-resolver-release]
@@ -241,28 +238,25 @@ jobs:
241238 - name : Checkout release tag
242239 uses : actions/checkout@v4
243240
244- - name : Install stable toolchain
245- uses : actions-rs/toolchain@v1
246- with :
247- profile : minimal
248- toolchain : stable
249- override : true
250-
251- - name : Install protoc
252- uses : arduino/setup-protoc@v3
253- with :
254- repo-token : ${{ secrets.GITHUB_TOKEN }}
241+ - name : Set up Docker Buildx
242+ uses : docker/setup-buildx-action@v3
255243
256- - name : Cargo login
257- run : cargo login ${{ secrets.CRATES_IO_TOKEN }}
244+ - name : Write crates.io token to file
245+ run : |
246+ echo "${{ secrets.CRATES_IO_TOKEN }}" > /tmp/crates_io_token.txt
258247
259248 - name : Wait for crates.io index update
260249 if : ${{ needs.publish-confidence-resolver-release.result == 'success' }}
261250 run : sleep 30
262251
263- - name : Publish to crates.io
264- working-directory : openfeature-provider/rust
265- run : cargo publish
252+ - name : Publish Rust provider with Docker
253+ uses : docker/build-push-action@v6
254+ with :
255+ context : .
256+ target : openfeature-provider-rust.publish
257+ cache-from : type=registry,ref=ghcr.io/${{ github.repository }}/cache:main
258+ secret-files : |
259+ crates_io_token=/tmp/crates_io_token.txt
266260
267261 publish-python-provider-release :
268262 needs : release
0 commit comments