Repository navigation
A pull request edits no existing issue but the one it takes up or one… #386
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: publish | |
| # A landing's SDK crates on crates.io, and the only workflow that may write | |
| # there: `cargo run -- --ci publish` (src/ci.rs) publishes what the index does | |
| # not hold, from main and nothing else. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| # crates.io trusted publishing: the job trades its OIDC token for a | |
| # short-lived crates.io token; no registry secret is stored. | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| # Never two publishers, and never cancel one: a cancelled `cargo publish` | |
| # may have already taken the version. | |
| concurrency: | |
| group: publish | |
| cancel-in-progress: false | |
| steps: | |
| # No submodules: `cargo publish` walks the repository's vcs state, and an | |
| # initialised but empty `rust/` breaks that walk. | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - id: auth | |
| uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5 | |
| - env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| run: cargo run -- --ci publish | |
| toolchain: | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/toolchain.yml |