Release wasmedge-types crate #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: wasmedge-types-release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
on: workflow_dispatch | |
jobs: | |
release_wasmedge_types: | |
name: Release wasmedge-types crate | |
runs-on: ubuntu-latest | |
container: | |
image: wasmedge/wasmedge:ubuntu-build-clang | |
steps: | |
- name: Checkout WasmEdge Rust SDK | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
path: wasmedge-rust-sdk | |
- name: Install Rust v1.68 | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.68 | |
- name: Dry run cargo publish | |
working-directory: wasmedge-rust-sdk | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRIES_TYPES_TOKEN }} | |
shell: bash | |
run: | | |
cargo publish --dry-run -p wasmedge-types | |
- name: Publish | |
working-directory: wasmedge-rust-sdk | |
if: github.ref == 'refs/heads/main' | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRIES_TYPES_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
cargo publish -p wasmedge-types | |
- name: Build API document | |
working-directory: wasmedge-rust-sdk | |
run: | | |
cargo doc -p wasmedge-types --no-deps --target-dir=./target | |
- name: Deploy API document | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: wasmedge-rust-sdk/target/doc | |
force_orphan: true |