Skip to content

fix publish job

fix publish job #349

Workflow file for this run

on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
name: CI
env:
RUST_TOOLCHAIN: stable
TOOLCHAIN_PROFILE: minimal
jobs:
# fmt:
# runs-on: ubuntu-latest
# name: stable / fmt
# steps:
# - uses: actions/checkout@v4
# - name: Install stable
# uses: dtolnay/rust-toolchain@stable
# with:
# components: rustfmt
# - name: cargo fmt
# run: cargo fmt --check
# clippy:
# runs-on: ubuntu-latest
# name: stable / clippy
# steps:
# - uses: actions/checkout@v4
# - name: Install stable
# uses: dtolnay/rust-toolchain@stable
# with:
# components: clippy
# - name: cargo clippy
# run: cargo clippy --all-targets --all-features --workspace -- -D warnings
# doc:
# # run docs generation on nightly rather than stable. This enables features like
# # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an
# # API be documented as only available in some specific platforms.
# runs-on: ubuntu-latest
# name: nightly / doc
# steps:
# - uses: actions/checkout@v4
# - name: Install nightly
# uses: dtolnay/rust-toolchain@nightly
# - name: Install cargo-docs-rs
# uses: dtolnay/install@cargo-docs-rs
# - name: cargo docs-rs
# run: cargo docs-rs
# test:
# runs-on: ubuntu-latest
# name: stable / test
# steps:
# - uses: actions/checkout@v4
# - name: Install stable
# uses: dtolnay/rust-toolchain@stable
# - name: cargo test
# run: cargo test --all-targets --all-features --workspace -- --include-ignored
# # https://github.com/rust-lang/cargo/issues/6669
# - name: cargo test --doc
# run: cargo test --all-features --workspace --doc
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
# if: startsWith(github.event.ref, 'refs/tags/v')
# needs: [fmt, clippy, test]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
# dry-run: true