Skip to content

Commit bd3260e

Browse files
RuoqingHeroypat
authored andcommitted
gha: Introduce auto publishing workflows
Add publish-kvm-bindings.yaml and publish-kvm-ioctls.yaml which use rust-lang/crates-io-auth-action to automate crates publishing. Signed-off-by: Patrick Roy <[email protected]> Signed-off-by: Ruoqing He <[email protected]>
1 parent 5290f56 commit bd3260e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish kvm-bindings to crates.io
2+
3+
on:
4+
push:
5+
tags: ['kvm-bindings-v*'] # Triggers when pushing tags starting with 'kvm-bindings-v'
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
# environment: release # Optional: for enhanced security
11+
permissions:
12+
id-token: write # Required for OIDC token exchange
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: rust-lang/crates-io-auth-action@v1
16+
id: auth
17+
- run: |
18+
cd kvm-bindings
19+
cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish kvm-ioctls to crates.io
2+
3+
on:
4+
push:
5+
tags: ['kvm-ioctls-v*'] # Triggers when pushing tags starting with 'kvm-ioctls-v'
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
# environment: release # Optional: for enhanced security
11+
permissions:
12+
id-token: write # Required for OIDC token exchange
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: rust-lang/crates-io-auth-action@v1
16+
id: auth
17+
- run: |
18+
cd kvm-ioctls
19+
cargo publish
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

0 commit comments

Comments
 (0)