This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (50 loc) · 1.7 KB
/
release.yml
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
name: Release
on:
push:
branches: [master]
jobs:
upload-binaries-to-gcs:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Update packages
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y pkg-config libudev-dev
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Configure build cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ matrix.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --verbose --all-features
env:
RUSTFLAGS: -D warnings
- name: Run tests
run: cargo test --all --verbose --all-features
- name: Create artifacts directory
run: mkdir artifacts
- name: Copy binaries to a separate directory
run: find target/release -maxdepth 1 -type f -executable | xargs --replace cp '{}' artifacts
- name: Strip binaries of debugging symbols
run: strip artifacts/*
- id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
workload_identity_provider: 'projects/281042598092/locations/global/workloadIdentityPools/github-actions/providers/google-cloud'
service_account: '[email protected]'
- name: Upload binaries to Google Cloud Storage
uses: 'google-github-actions/upload-cloud-storage@v0'
with:
path: artifacts
destination: radicle-client-services/
parent: false