mirror of
https://github.com/seemueller-io/hyper-custom-cert.git
synced 2025-09-08 22:46:45 +00:00
Bump version to 0.3.0 and improve workflows by adding docs
job, integrating documentation checks into release.yml
, and enhancing trusted publishing process.
This commit is contained in:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -70,3 +70,8 @@ jobs:
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo test $FLAGS -- --nocapture"
|
||||
cargo test $FLAGS -- --nocapture
|
||||
|
||||
- name: Build Docs
|
||||
shell: bash
|
||||
run: |
|
||||
cargo doc -p hyper-custom-cert --no-deps
|
||||
|
76
.github/workflows/docs.yml
vendored
76
.github/workflows/docs.yml
vendored
@@ -1,76 +0,0 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: Build and validate documentation
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: crates/hyper-custom-cert
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: default-features
|
||||
features: ""
|
||||
no-default-features: false
|
||||
- name: no-default-features
|
||||
features: ""
|
||||
no-default-features: true
|
||||
- name: rustls
|
||||
features: "rustls"
|
||||
no-default-features: true
|
||||
- name: insecure-dangerous
|
||||
features: "insecure-dangerous"
|
||||
no-default-features: false
|
||||
- name: all-features
|
||||
features: "rustls,insecure-dangerous"
|
||||
no-default-features: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Setup Rust
|
||||
run: rustup update stable && rustup default stable
|
||||
|
||||
- name: Build documentation
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo doc $FLAGS --no-deps"
|
||||
cargo doc $FLAGS --no-deps
|
||||
|
||||
- name: Check documentation warnings
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo doc $FLAGS --no-deps"
|
||||
RUSTDOCFLAGS="-D warnings" cargo doc $FLAGS --no-deps
|
||||
|
||||
- name: Test documentation examples
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo test --doc $FLAGS"
|
||||
cargo test --doc $FLAGS
|
82
.github/workflows/release.yml
vendored
82
.github/workflows/release.yml
vendored
@@ -9,9 +9,79 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: Build and validate documentation
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: crates/hyper-custom-cert
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: default-features
|
||||
features: ""
|
||||
no-default-features: false
|
||||
- name: no-default-features
|
||||
features: ""
|
||||
no-default-features: true
|
||||
- name: rustls
|
||||
features: "rustls"
|
||||
no-default-features: true
|
||||
- name: insecure-dangerous
|
||||
features: "insecure-dangerous"
|
||||
no-default-features: false
|
||||
- name: all-features
|
||||
features: "rustls,insecure-dangerous"
|
||||
no-default-features: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Setup Rust
|
||||
run: rustup update stable && rustup default stable
|
||||
|
||||
- name: Build documentation
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo doc $FLAGS --no-deps"
|
||||
cargo doc $FLAGS --no-deps
|
||||
|
||||
- name: Check documentation warnings
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo doc $FLAGS --no-deps"
|
||||
RUSTDOCFLAGS="-D warnings" cargo doc $FLAGS --no-deps
|
||||
|
||||
- name: Test documentation examples
|
||||
shell: bash
|
||||
run: |
|
||||
FLAGS=""
|
||||
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
|
||||
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
|
||||
echo "Running: cargo test --doc $FLAGS"
|
||||
cargo test --doc $FLAGS
|
||||
|
||||
test:
|
||||
name: Test before release
|
||||
runs-on: ubuntu-latest
|
||||
needs: docs
|
||||
defaults:
|
||||
run:
|
||||
working-directory: crates/hyper-custom-cert
|
||||
@@ -75,9 +145,12 @@ jobs:
|
||||
echo "Running: cargo test $FLAGS -- --nocapture"
|
||||
cargo test $FLAGS -- --nocapture
|
||||
|
||||
|
||||
publish:
|
||||
name: Publish to crates.io
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write # Required for OIDC token exchange https://crates.io/docs/trusted-publishing
|
||||
needs: test
|
||||
defaults:
|
||||
run:
|
||||
@@ -108,10 +181,13 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Publish to crates.io
|
||||
# See Trusted publishing: https://crates.io/docs/trusted-publishing
|
||||
- uses: rust-lang/crates-io-auth-action@v1
|
||||
id: auth
|
||||
|
||||
- run: cargo publish
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
run: cargo rustdoc -p hyper-custom-cert --all-features && cargo publish
|
||||
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
||||
|
||||
release:
|
||||
name: Create GitHub Release
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -364,7 +364,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hyper-custom-cert"
|
||||
version = "0.2.2"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"hyper-rustls",
|
||||
"hyper-tls",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "hyper-custom-cert"
|
||||
version = "0.2.2"
|
||||
version = "0.3.0"
|
||||
edition = "2024"
|
||||
description = "A small, ergonomic HTTP client wrapper around hyper with optional support for custom Root CAs and a dev-only insecure mode for self-signed certificates."
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
Reference in New Issue
Block a user