Skip to content

Commit 8c8aa93

Browse files
authored
Create deployment.yml
1 parent 41c0982 commit 8c8aa93

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/workflows/deployment.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
ame: Deployment
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build-linux:
13+
permissions: write-all
14+
name: linux
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Update Libs
19+
run: sudo apt-get install libgtk-3-dev && sudo apt-get install libudev-dev && cargo install cargo-bundle
20+
- name: Build
21+
run: cargo bundle --release
22+
- name: Compress
23+
run: ls target/release/bundle/deb && cd target/release/bundle/deb && zip rust-serial-monitor.deb.zip *.deb
24+
- name: Upload
25+
uses: actions/upload-release-asset@v1.0.1
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
upload_url: ${{ github.event.release.upload_url }}
30+
asset_path: ./target/release/bundle/deb/rust-serial-monitor.deb.zip
31+
asset_name: rust-serial-monitor-linux_x86.zip
32+
asset_content_type: binary
33+
34+
build-macos:
35+
permissions: write-all
36+
name: macos
37+
runs-on: macos-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
- name: Update Libs
41+
run: cargo install cargo-bundle
42+
- name: Build
43+
run: cargo bundle --release
44+
- name: Compress
45+
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
46+
- name: Upload
47+
uses: actions/upload-release-asset@v1.0.1
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
upload_url: ${{ github.event.release.upload_url }}
52+
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
53+
asset_name: rust-serial-monitor.app-macos_x86.zip
54+
asset_content_type: binary
55+
56+
build-windows:
57+
permissions: write-all
58+
name: windows
59+
runs-on: windows-latest
60+
steps:
61+
- uses: actions/checkout@v3
62+
- name: Update Libs
63+
run: cargo install cargo-wix
64+
- name: Build
65+
run: cargo wix
66+
- name: Compress
67+
run: cd wix && ls && zip *.msi rust-serial-monitor.msi.zip
68+
- name: Upload
69+
uses: actions/upload-release-asset@v1.0.1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
upload_url: ${{ github.event.release.upload_url }}
74+
asset_path: wix/rust-serial-monitor.msi.zip
75+
asset_name: rust-serial-monitor.msi-windows_x86.zip
76+
asset_content_type: binary

0 commit comments

Comments
 (0)