Skip to content

Update bitwarden/gh-actions digest to 4a7ddc1 #1195

Update bitwarden/gh-actions digest to 4a7ddc1

Update bitwarden/gh-actions digest to 4a7ddc1 #1195

---
name: Build Rust crates
on:
workflow_dispatch:
pull_request:
push:
branches:
- "master"
- "rc"
- "hotfix-rc"
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Building ${{matrix.package}} for - ${{ matrix.os }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
package:
- bitwarden
- bitwarden-api-api
- bitwarden-api-identity
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install rust
uses: dtolnay/rust-toolchain@f361669954a8ecfc00a3443f35f9ac8e610ffc06 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo registry
uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2
- name: Build
run: cargo build -p ${{ matrix.package }} --release
env:
RUSTFLAGS: "-D warnings"
- name: Build Internal
if: ${{ matrix.package == 'bitwarden' }}
run: cargo build -p ${{ matrix.package }} --features internal --release
env:
RUSTFLAGS: "-D warnings"
release-dry-run:
name: Release dry-run
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/head/master' || github.ref == 'refs/head/rc' || github.ref == 'refs/head/hotfix-rc' }}
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Install rust
uses: dtolnay/rust-toolchain@f361669954a8ecfc00a3443f35f9ac8e610ffc06 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache cargo registry
uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2
- name: Install cargo-release
run: cargo install cargo-release
- name: Cargo release dry run
run: cargo-release release publish --no-publish -p bitwarden-api-api -p bitwarden-api-identity -p bitwarden