-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.34 KB
/
Copy pathci.yml
File metadata and controls
49 lines (45 loc) · 1.34 KB
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: CI
on:
push:
branches: [main]
tags:
- "v*"
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --check
- run: cargo test --locked
- run: cargo clippy --all-targets --locked -- -D warnings
release-artifact:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
needs: [linux]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo build --locked --release
- name: Package Linux release binary
run: |
mkdir -p target/release/dist
cp target/release/termviz target/release/dist/termviz
tar -czf "termviz-linux-x86_64.tar.gz" -C target/release/dist termviz
sha256sum "termviz-linux-x86_64.tar.gz" > "termviz-linux-x86_64.tar.gz.sha256"
- uses: actions/upload-artifact@v4
with:
name: termviz-linux-release-${{ github.ref_name }}
path: |
termviz-linux-x86_64.tar.gz
termviz-linux-x86_64.tar.gz.sha256
retention-days: 14