mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-18 20:16:42 +00:00
Fix OSDK publish CI panics
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
33a7da9991
commit
39c2e17f75
29
.github/workflows/osdk_publish.yml
vendored
29
.github/workflows/osdk_publish.yml
vendored
@ -1,12 +1,15 @@
|
|||||||
name: OSDK Publish
|
name: OSDK Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
pull_request:
|
||||||
push:
|
|
||||||
paths:
|
paths:
|
||||||
|
- VERSION
|
||||||
- osdk/Cargo.toml
|
- osdk/Cargo.toml
|
||||||
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths:
|
||||||
|
- VERSION
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
osdk-publish:
|
osdk-publish:
|
||||||
@ -15,9 +18,19 @@ jobs:
|
|||||||
container: asterinas/asterinas:0.4.2
|
container: asterinas/asterinas:0.4.2
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: katyo/publish-crates@v2
|
|
||||||
with:
|
- name: Check Publish
|
||||||
path: './osdk'
|
# On pull request, set `--dry-run` to check whether OSDK can publish
|
||||||
args: --no-verify
|
if: github.event_name == 'pull_request'
|
||||||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
run: |
|
||||||
ignore-unpublished-changes: true
|
cd osdk
|
||||||
|
cargo publish --dry-run
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
# On push, OSDK will be published
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
env:
|
||||||
|
REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cd osdk
|
||||||
|
cargo publish --token ${REGISTRY_TOKEN}
|
||||||
|
Reference in New Issue
Block a user