try fix docs build #1
Workflow file for this run
This file contains hidden or 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: Release Crates | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - ".github/workflows/release.yml" | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # Publish package one by one instead of flooding the registry | |
| max-parallel: 1 | |
| matrix: | |
| # Order here is sensitive, as it will be used to determine the order of publishing | |
| package: | |
| - "core" | |
| - "hook" | |
| - "macros" | |
| - "open-coroutine" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Update version in Cargo.toml | |
| run: | | |
| VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//') | |
| sed -i "s/^version = .*/version = \"$VERSION\"/" ${{ github.workspace }}/Cargo.toml | |
| - name: Dryrun ${{ matrix.package }} | |
| working-directory: ${{ matrix.package }} | |
| run: cargo publish --dry-run | |
| - name: Publish ${{ matrix.package }} | |
| working-directory: ${{ matrix.package }} | |
| # Only publish if it's a tag and the tag is not a pre-release | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') }} | |
| run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |