-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (38 loc) · 1.02 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
name: Package
on:
push:
branches: [main]
tags: ["*"]
env:
CARGO_TERM_COLOR: always
cargo-deb-version: 1.41.6
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache .cargo and target
uses: actions/cache@v4
with:
path: |
~/.cargo/git
~/.cargo/registry
target
key: ${{ runner.os }}-package-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo-deb
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/cargo-deb
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: ${{ runner.os }}-cargo-bin-${{ env.cargo-deb-version }}
- name: Install cargo-deb
run: cargo install cargo-deb --version ${{ env.cargo-deb-version }}
- name: Package
run: cargo deb
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: debian-packages
path: target/debian/*.deb