-
Notifications
You must be signed in to change notification settings - Fork 28
49 lines (41 loc) · 1.3 KB
/
build.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
name: build
on: [pull_request, push]
jobs:
wired:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Restore cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libdbus-1-dev libcairo-dev libpango1.0-dev libglib2.0-dev \
libx11-dev libxss-dev rustc cargo pkg-config
- name: Build wired-notify
run: cargo build --release
- name: Create tarball
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p bin
cp target/release/wired bin/
VERSION=$(./bin/wired --version)
tar -czf "wired_${VERSION}_x86_64.tar.gz" \
bin/wired LICENSE
- name: Release tarball
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wired_*_x86_64.tar.gz
- name: SHA256 Hash
if: startsWith(github.ref, 'refs/tags/')
run: sha256sum wired_*_x86_64.tar.gz