mirror of
https://git.sdf.org/epl692/tui-mqtt-chat.git
synced 2025-12-08 05:48:49 -05:00
Compare commits
3 Commits
b9bad2f1a3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| eaeb7cc2d1 | |||
| c221dd766b | |||
| b475ae1e78 |
48
.gitea/workflows/main.yml
Normal file
48
.gitea/workflows/main.yml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
|
||||||
|
name: Rust
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
if: startsWith(gitea.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Build release binary
|
||||||
|
run: cargo build --release --verbose
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/gitea-create-release@v1
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ gitea.ref }}
|
||||||
|
release_name: Release ${{ gitea.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
- name: Upload Release Asset
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/gitea-upload-asset@v1
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./target/release/tui-mqtt-chat
|
||||||
|
asset_name: tui-mqtt-chat
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
@@ -244,7 +244,7 @@ fn ui(f: &mut Frame, app: &mut App) {
|
|||||||
let chunks = Layout::default()
|
let chunks = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.margin(1)
|
.margin(1)
|
||||||
.constraints([Constraint::Percentage(80), Constraint::Percentage(20)].as_ref())
|
.constraints([Constraint::Percentage(70), Constraint::Percentage(30)].as_ref())
|
||||||
.split(f.size());
|
.split(f.size());
|
||||||
|
|
||||||
let messages: Vec<ListItem> = app
|
let messages: Vec<ListItem> = app
|
||||||
|
|||||||
Reference in New Issue
Block a user