mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
ci: add crates-release.yml workflow to publish to crates.io
Publish two crates: `bootc-internal-utils` and `bootc-internal-blockdev` Part of https://github.com/bootc-dev/infra/issues/20 Signed-off-by: Huijing Hei <hhei@redhat.com>
This commit is contained in:
committed by
Colin Walters
parent
fa1726b161
commit
40dafdbfda
22
.github/workflows/crates-release.yml
vendored
Normal file
22
.github/workflows/crates-release.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# See https://crates.io/docs/trusted-publishing
|
||||
name: Publish to crates.io
|
||||
on:
|
||||
push:
|
||||
tags: ['v*'] # Triggers when pushing tags starting with 'v'
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
id-token: write # Required for OIDC token exchange
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: rust-lang/crates-io-auth-action@v1
|
||||
id: auth
|
||||
- run: |
|
||||
for crate in bootc-internal-utils bootc-internal-blockdev; do
|
||||
echo "Publishing $crate..."
|
||||
cargo publish -p "$crate"
|
||||
echo "Successfully published $crate"
|
||||
done
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
||||
Reference in New Issue
Block a user