Skip to content

Release wasmedge-macro crate #3

Release wasmedge-macro crate

Release wasmedge-macro crate #3

name: wasmedge-macro-release
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on: workflow_dispatch
jobs:
release_wasmedge_macro:
name: Release wasmedge-macro crate
runs-on: ubuntu-22.04
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_MACRO_TOKEN }}
shell: bash
run: |
cargo publish --dry-run -p wasmedge-macro
- name: Publish
working-directory: wasmedge-rust-sdk
if: github.ref == 'refs/heads/main'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRIES_MACRO_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
cargo publish -p wasmedge-macro
- name: Build API document
working-directory: wasmedge-rust-sdk
run: |
cargo doc -p wasmedge-macro --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