-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (53 loc) · 1.61 KB
/
Package.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
53
54
55
56
57
58
59
60
61
name: Package
# on:
# workflow_run:
# workflows: [Tests]
# types: [completed]
on:
pull_request:
branches: [main]
push:
branches: ["main"]
tags: ["*"]
env:
CARGO_INCREMENTAL: 0 # this setting is automatically applied by rust-cache but documented here for explicitness
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
RUSTUP_MAX_RETRIES: 10
jobs:
on-failure:
runs-on: oracles-20.04
# if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
on-success:
runs-on: oracles-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build-release
cancel-in-progress: true
# if: ${{ github.event.workflow_run.conclusion == 'success' }} && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Release
run: cargo build --all --release
- name: Debian packaging
env:
# PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }}
PACKAGECLOUD_API_KEY: XXX
run: |
chmod +x ./.github/scripts/make_debian.sh
./.github/scripts/make_debian.sh