-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (66 loc) · 1.89 KB
/
main.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Main
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
name: Installing Rust Toolchain
with:
profile: default
toolchain: stable
override: true
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.3
- uses: actions-rs/cargo@v1
name: Cargo Fmt
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
name: Cargo Clippy
with:
command: clippy
args: --release -- -D warnings
- uses: actions-rs/cargo@v1
name: Cargo Build
with:
command: build
args: --release
- uses: google-github-actions/release-please-action@v4
name: Release
id: release
with:
release-type: rust
package-name: firesquid
- name: Get assets
if: ${{ steps.release.outputs.release_created }}
run: curl -fsSL https://raw.githubusercontent.com/sousandrei/firesquid/main/scripts/getassets.sh | sh
- uses: actions-rs/cargo@v1
if: ${{ steps.release.outputs.release_created }}
name: Install Cargo Deb
with:
command: install
args: cargo-deb
- uses: actions-rs/cargo@v1
if: ${{ steps.release.outputs.release_created }}
name: Build Debian Package
with:
command: deb
- name: Upload Release Artifact
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./target/debian/*.deb