Skip to content

Commit 8cf8d07

Browse files
authored
Merge pull request #113 from hacknus/self-update
Add possibility to Self update
2 parents 626d7d5 + 26d8d3e commit 8cf8d07

File tree

9 files changed

+1461
-315
lines changed

9 files changed

+1461
-315
lines changed

.github/workflows/deployment.yml

+63-17
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
CARGO_TERM_COLOR: always
1010

1111
jobs:
12-
build-linux:
12+
build-linux-deb:
1313
permissions: write-all
1414
name: linux
1515
runs-on: ubuntu-20.04
@@ -19,18 +19,40 @@ jobs:
1919
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
2020
- name: Build
2121
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: Rename
25-
run: ls target/release/bundle/deb && cd target/release/bundle/deb && mv *.deb rust-serial-monitor.deb
22+
- name: Compress.
23+
run: ls target/release/bundle/deb && cd target/release/bundle/deb && zip serial-monitor.deb.zip *.deb
24+
# - name: Rename
25+
# run: ls target/release/bundle/deb && cd target/release/bundle/deb && mv *.deb serial-monitor.deb
2626
- name: Upload Deb
2727
uses: actions/[email protected]
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
with:
3131
upload_url: ${{ github.event.release.upload_url }}
32-
asset_path: ./target/release/bundle/deb/rust-serial-monitor.deb
33-
asset_name: rust-serial-monitor-linux_x86.deb
32+
asset_path: ./target/release/bundle/deb/serial-monitor.deb.zip
33+
asset_name: serial-monitor-i686-unknown-linux-gnu.deb.zip
34+
asset_content_type: binary
35+
36+
build-linux-bin:
37+
permissions: write-all
38+
name: linux
39+
runs-on: ubuntu-20.04
40+
steps:
41+
- uses: actions/checkout@v3
42+
- name: Update Libs
43+
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
44+
- name: Build
45+
run: cargo build --release
46+
- name: Compress.
47+
run: cd target/release && zip -r serial-monitor.zip serial-monitor-rust
48+
- name: Upload Bin
49+
uses: actions/[email protected]
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ github.event.release.upload_url }}
54+
asset_path: ./target/release/bundle/deb/serial-monitor.zip
55+
asset_name: serial-monitor-i686-unknown-linux-gnu-bin.zip
3456
asset_content_type: binary
3557

3658
build-macos-x86:
@@ -44,15 +66,15 @@ jobs:
4466
- name: Build
4567
run: cargo bundle --release
4668
- name: Compress
47-
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
69+
run: cd target/release/bundle/osx && ls && zip -r serial-monitor.app.zip Serial\ Monitor.app/*
4870
- name: Upload
4971
uses: actions/[email protected]
5072
env:
5173
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5274
with:
5375
upload_url: ${{ github.event.release.upload_url }}
54-
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
55-
asset_name: rust-serial-monitor-macos_x86.app.zip
76+
asset_path: ./target/release/bundle/osx/serial-monitor.app.zip
77+
asset_name: serial-monitor-i686-apple-darwin.app.zip
5678
asset_content_type: binary
5779

5880
build-macos-arm:
@@ -66,18 +88,42 @@ jobs:
6688
- name: Build
6789
run: cargo bundle --release
6890
- name: Compress
69-
run: cd target/release/bundle/osx && ls && zip -r rust-serial-monitor.app.zip Serial\ Monitor.app/*
91+
run: cd target/release/bundle/osx && ls && zip -r serial-monitor.app.zip Serial\ Monitor.app/*
92+
- name: Upload
93+
uses: actions/[email protected]
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
with:
97+
upload_url: ${{ github.event.release.upload_url }}
98+
asset_path: ./target/release/bundle/osx/serial-monitor.app.zip
99+
asset_name: serial-monitor-x86_64-apple-darwin.app.zip
100+
asset_content_type: binary
101+
102+
build-windows-exe:
103+
permissions: write-all
104+
name: windows
105+
runs-on: windows-2019
106+
steps:
107+
- uses: actions/checkout@v3
108+
- name: Update Libs
109+
run: cargo install --force cargo-wix
110+
- name: Build
111+
run: cargo build --release
112+
- name: Compress
113+
run: |
114+
cd target/release
115+
Compress-Archive serial-monitor-rust.exe serial-monitor.exe.zip
70116
- name: Upload
71117
uses: actions/[email protected]
72118
env:
73119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74120
with:
75121
upload_url: ${{ github.event.release.upload_url }}
76-
asset_path: ./target/release/bundle/osx/rust-serial-monitor.app.zip
77-
asset_name: rust-serial-monitor-macos_arm.app.zip
122+
asset_path: target/release/rust-serial-monitor.exe.zip
123+
asset_name: serial-monitor-i686-pc-windows-msvc.exe.zip
78124
asset_content_type: binary
79125

80-
build-windows:
126+
build-windows-msi:
81127
permissions: write-all
82128
name: windows
83129
runs-on: windows-2019
@@ -88,13 +134,13 @@ jobs:
88134
- name: Build
89135
run: cargo wix
90136
- name: Compress
91-
run: cd target/wix && ls && Compress-Archive *.msi rust-serial-monitor.msi.zip
137+
run: cd target/wix && ls && Compress-Archive *.msi serial-monitor.msi.zip
92138
- name: Upload
93139
uses: actions/[email protected]
94140
env:
95141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96142
with:
97143
upload_url: ${{ github.event.release.upload_url }}
98-
asset_path: target/wix/rust-serial-monitor.msi.zip
99-
asset_name: rust-serial-monitor-windows_x86.msi.zip
144+
asset_path: target/wix/serial-monitor.msi.zip
145+
asset_name: serial-monitor-i686-pc-windows-msvc.msi.zip
100146
asset_content_type: binary

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to the `Serial Monitor` crate will be documented in this fil
44

55
# Unreleased 0.3.x
66

7-
* ...
7+
* implement option to update the application
88

99
## 0.3.3
1010

0 commit comments

Comments
 (0)