Test release pipeline with new token #565
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: [main] | |
pull_request: | |
name: Continuous integration | |
jobs: | |
udeps: | |
name: Udeps | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jrobsonchase/direnv-action@v0.7 | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: udeps | |
args: --workspace --all-targets --all-features | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jrobsonchase/direnv-action@v0.7 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jrobsonchase/direnv-action@v0.7 | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --all-features --workspace -- -D warnings | |
test-nix: | |
name: Test Nix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jrobsonchase/direnv-action@v0.7 | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
env: | |
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
with: | |
command: test | |
args: --workspace --all-targets | |
test-stable: | |
name: Test Stable | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
# We don't actualy have sccache installed here (yet), but it still | |
# benefits from the cargo cache. | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
env: | |
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
with: | |
command: test | |
args: --features=paid-tests,long-tests --workspace --all-targets | |
test-win: | |
name: Test Windows Stable | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
# We don't actualy have sccache installed here (yet), but it still | |
# benefits from the cargo cache. | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
env: | |
NGROK_AUTHTOKEN: ${{ secrets.NGROK_AUTHTOKEN }} | |
with: | |
command: test | |
args: --workspace --all-targets | |
semver: | |
name: Semver Check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
crate: [muxado, ngrok] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jrobsonchase/direnv-action@v0.7 | |
- uses: ./.github/workflows/rust-cache | |
- uses: actions-rs/cargo@v1 | |
name: semver checks | |
with: | |
command: semver-checks | |
args: check-release -p ${{ matrix.crate }} | |
# These are sequenced because the muxado version referenced by ngrok has to | |
# exist on crates.io before ngrok can be published. | |
publish-muxado: | |
name: Publish muxado | |
uses: ./.github/workflows/release.yml | |
needs: [udeps, fmt, clippy, test-nix, test-stable, test-win, semver] | |
if: github.ref_name == 'main' && github.repository == 'ngrok/ngrok-rust' | |
permissions: | |
contents: write | |
with: | |
crate: muxado | |
secrets: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
publish-ngrok: | |
name: Publish ngrok | |
uses: ./.github/workflows/release.yml | |
needs: [publish-muxado] | |
permissions: | |
contents: write | |
with: | |
crate: ngrok | |
secrets: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
publish-cargo-doc-ngrok: | |
name: Publish cargo-doc-ngrok | |
uses: ./.github/workflows/release.yml | |
needs: [publish-ngrok] | |
permissions: | |
contents: write | |
with: | |
crate: cargo-doc-ngrok | |
secrets: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |