diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8228173 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + publish: + name: Publish to crates.io + runs-on: ubuntu-latest + timeout-minutes: 15 + environment: crates-io + permissions: + contents: read + id-token: write + env: + CARGO_TERM_COLOR: always + CARGO_BUILD_JOBS: "4" + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@7e38f4b43b4db5c8dd498af069a4f6196df1d067 + with: + toolchain: stable + - run: cargo publish -p tuplities --locked --dry-run + - uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1 + id: auth + - run: cargo publish -p tuplities --locked + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 905cb48..16eaca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Public methods provide executable examples for result shapes, borrowed mutation, and conversion errors. - `cargo llvm-cov` measures runtime targets and doctests. - CI covers Rust `1.85.0`, allocator-free embedded builds, supported flat widths, and mixed features. +- GitHub releases publish `tuplities` to `crates.io` using `OIDC` trusted publishing. - `unsafe_code` is forbidden. ## [0.1.4] - 2025-12-15