-
Notifications
You must be signed in to change notification settings - Fork 16
100 lines (94 loc) · 3.4 KB
/
deployment.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Deployment
on:
release:
types:
- created
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
permissions: write-all
name: linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Update Libs
run: sudo apt-get update && sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle
- name: Build
run: cargo bundle --release
# - name: Compress.
# run: ls target/release/bundle/deb && cd target/release/bundle/deb && zip rust-serial-monitor.deb.zip *.deb
- name: Rename
run: ls target/release/bundle/deb && cd target/release/bundle/deb && mv *.deb rust-serial-monitor.deb
- name: Upload Deb
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/bundle/deb/rust-serial-monitor.deb
asset_name: rust-serial-monitor-linux_x86.deb
asset_content_type: binary
build-macos-x86:
permissions: write-all
name: macos x86
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Update Libs
run: cargo install cargo-bundle
- name: Build
run: cargo bundle --release
- name: Compress
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
asset_name: rust-serial-monitor-macos_x86.app.zip
asset_content_type: binary
build-macos-arm:
permissions: write-all
name: macos arm
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Update Libs
run: cargo install cargo-bundle
- name: Build
run: cargo bundle --release
- name: Compress
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
asset_name: rust-serial-monitor-macos_arm.app.zip
asset_content_type: binary
build-windows:
permissions: write-all
name: windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Update Libs
run: cargo install cargo-wix
- name: Build
run: cargo wix
- name: Compress
run: cd target/wix && ls && Compress-Archive *.msi rust-serial-monitor.msi.zip
- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/wix/rust-serial-monitor.msi.zip
asset_name: rust-serial-monitor-windows_x86.msi.zip
asset_content_type: binary