Set up new workspace publish workflow

This sets up the publish workflow to use the new OIDC authentication,
and to publish the whole workspace at once.
This commit is contained in:
Eric Huss
2025-09-26 17:37:46 -07:00
parent 4a28995641
commit 4fc72e8d9f
3 changed files with 16 additions and 9 deletions

View File

@@ -51,11 +51,17 @@ jobs:
publish: publish:
name: Publish to crates.io name: Publish to crates.io
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
# Required for OIDC token exchange
id-token: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust (rustup) - name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable run: rustup update stable --no-self-update && rustup default stable
- name: Authenticate with crates.io
id: auth
uses: rust-lang/crates-io-auth-action@v1
- name: Publish - name: Publish
env: env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
run: cargo publish --no-verify run: cargo publish --workspace --no-verify

View File

@@ -39,13 +39,13 @@ hex = "0.4.3"
html5ever = "0.35.0" html5ever = "0.35.0"
indexmap = "2.10.0" indexmap = "2.10.0"
ignore = "0.4.23" ignore = "0.4.23"
mdbook-core = { path = "crates/mdbook-core" } mdbook-core = { path = "crates/mdbook-core", version = "0.5.0-alpha.1" }
mdbook-driver = { path = "crates/mdbook-driver" } mdbook-driver = { path = "crates/mdbook-driver", version = "0.5.0-alpha.1" }
mdbook-html = { path = "crates/mdbook-html" } mdbook-html = { path = "crates/mdbook-html", version = "0.5.0-alpha.1" }
mdbook-markdown = { path = "crates/mdbook-markdown" } mdbook-markdown = { path = "crates/mdbook-markdown", version = "0.5.0-alpha.1" }
mdbook-preprocessor = { path = "crates/mdbook-preprocessor" } mdbook-preprocessor = { path = "crates/mdbook-preprocessor", version = "0.5.0-alpha.1" }
mdbook-renderer = { path = "crates/mdbook-renderer" } mdbook-renderer = { path = "crates/mdbook-renderer", version = "0.5.0-alpha.1" }
mdbook-summary = { path = "crates/mdbook-summary" } mdbook-summary = { path = "crates/mdbook-summary", version = "0.5.0-alpha.1" }
memchr = "2.7.5" memchr = "2.7.5"
notify = "8.1.0" notify = "8.1.0"
notify-debouncer-mini = "0.6.0" notify-debouncer-mini = "0.6.0"

View File

@@ -2,6 +2,7 @@
name = "mdbook-remove-emphasis" name = "mdbook-remove-emphasis"
version = "0.1.0" version = "0.1.0"
edition.workspace = true edition.workspace = true
publish = false
[dependencies] [dependencies]
mdbook-preprocessor.workspace = true mdbook-preprocessor.workspace = true