Merge torrust/torrust-tracker#445: Release Version 3.0.0-alpha.8 #5
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
name: Deployment | |
on: | |
push: | |
branches: | |
- "releases/**/*" | |
jobs: | |
secrets: | |
name: Secrets | |
environment: crates-io-torrust | |
runs-on: ubuntu-latest | |
outputs: | |
continue: ${{ steps.check.outputs.continue }} | |
steps: | |
- id: check | |
name: Check | |
env: | |
CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}" | |
if: "${{ env.CARGO_REGISTRY_TOKEN != '' }}" | |
run: echo "continue=true" >> $GITHUB_OUTPUT | |
test: | |
name: Test | |
needs: secrets | |
if: needs.secrets.outputs.continue == 'true' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: [stable, nightly] | |
steps: | |
- id: checkout | |
name: Checkout Repository | |
uses: actions/checkout@v4 | |
- id: setup | |
name: Setup Toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- id: test | |
name: Run Unit Tests | |
run: cargo test --tests --benches --examples --workspace --all-targets --all-features | |
publish: | |
name: Publish | |
environment: crates-io-torrust | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- id: checkout | |
name: Checkout Repository | |
uses: actions/checkout@v4 | |
- id: setup | |
name: Setup Toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- id: publish | |
name: Publish Crates | |
env: | |
CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}" | |
run: | | |
cargo publish -p torrust-tracker-contrib-bencode | |
cargo publish -p torrust-tracker-located-error | |
cargo publish -p torrust-tracker-primitives | |
cargo publish -p torrust-tracker-configuration | |
cargo publish -p torrust-tracker-test-helpers | |
cargo publish -p torrust-tracker |