-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (48 loc) · 1.3 KB
/
ci-cd.yaml
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
name: CI/CD
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
repository_dispatch:
types: [remote-build]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: "--deny warnings"
RUST_TOOLCHAIN: nightly-2023-02-27
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
ref: ${{ github.head_ref }}
- name: Update Submodule
run: |
git submodule update --init --force --recursive --remote
- uses: arduino/setup-protoc@v2
with:
version: "23.2"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo build --release --all-features
if: ${{ github.ref == 'refs/heads/main' }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: massabot
commit_user_email: [email protected]
commit_author: massabot <[email protected]>