-
Notifications
You must be signed in to change notification settings - Fork 88
75 lines (59 loc) · 1.77 KB
/
Copy pathbuild-rust-crates.yml
File metadata and controls
75 lines (59 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Rust crates
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
build:
name: Building ${{matrix.package}} for - ${{ matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
os:
- macos-15
- ubuntu-24.04
- windows-2022
package:
- bitwarden
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
- name: Cache cargo registry
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
- name: Build
run: cargo build --locked -p ${{ matrix.package }} --release
env:
RUSTFLAGS: "-D warnings"
release-dry-run:
name: Release dry-run
runs-on: ubuntu-24.04
if: ${{ github.ref == 'refs/head/main' }}
needs: build
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: stable
- name: Cache cargo registry
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
- name: Install cargo-release
run: cargo install cargo-release
- name: Cargo release dry run
run: cargo-release release publish --no-publish -p bitwarden