Skip to content

Commit ffd3355

Browse files
refactor: Update client package name
add .github directory and deploy script
1 parent ac78638 commit ffd3355

6 files changed

Lines changed: 185 additions & 65 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Create Linux Arm64 binary for testing
2+
3+
on:
4+
push:
5+
branches:
6+
- "test/*"
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-24.04-arm
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Install Rust
17+
uses: dtolnay/rust-toolchain@stable
18+
19+
- name: Build release binary
20+
run: cargo build --release --workspace
21+
22+
- name: Rename binaries
23+
run: |
24+
mkdir dist
25+
mv target/release/null-talk dist/null-talk-linux-arm64
26+
mv target/release/null-talk-server dist/null-talk-server-linux-arm64
27+
28+
- name: Upload Build to Server
29+
uses: appleboy/scp-action@v0.1.7
30+
with:
31+
host: ${{ secrets.HOST }}
32+
username: ${{ secrets.USERNAME }}
33+
key: ${{ secrets.PRIVATE_KEY }}
34+
source: "dist"
35+
target: ${{ secrets.TARGET_PATH }}

.github/workflows/release.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Release
2+
3+
4+
on:
5+
push:
6+
tags:
7+
- "v*.*.*" # Only run on version tags like v1.0.0
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
name: Build binaries
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install Rust
25+
uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Build release binary
28+
run: cargo build --release --workspace
29+
30+
- name: Rename binaries (Linux)
31+
if: runner.os == 'Linux'
32+
run: |
33+
if [ "${{ runner.arch }}" = "X64" ]; then
34+
mv target/release/null-talk null-talk-linux-x86_64
35+
mv target/release/null-talk-server null-talk-server-linux-x86_64
36+
elif [ "${{ runner.arch }}" = "ARM64" ]; then
37+
mv target/release/null-talk null-talk-linux-arm64
38+
mv target/release/null-talk-server null-talk-server-linux-arm64
39+
fi
40+
41+
- name: Rename binaries (Windows)
42+
if: runner.os == 'Windows'
43+
run: |
44+
move target\release\null-talk.exe null-talk-windows.exe
45+
move target\release\null-talk-server.exe null-talk-server-windows.exe
46+
47+
- name: Rename binaries (macOS)
48+
if: runner.os == 'macOS'
49+
run: |
50+
mv target/release/null-talk null-talk-macos
51+
mv target/release/null-talk-server null-talk-server-macos
52+
53+
- name: Upload binaries as artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: null-talk-${{ matrix.os }}
57+
path: |
58+
null-talk-*
59+
null-talk-server-*
60+
61+
release:
62+
name: Upload to GitHub Releases
63+
needs: build
64+
runs-on: ubuntu-latest
65+
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
70+
- name: Download build artifacts
71+
uses: actions/download-artifact@v4
72+
with:
73+
path: ./artifacts
74+
75+
- name: Flatten artifacts
76+
run: mv artifacts/*/* .
77+
78+
- name: Upload release assets
79+
uses: softprops/action-gh-release@v2
80+
with:
81+
files: |
82+
null-talk-*
83+
null-talk-server-*
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.lock

Lines changed: 62 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "null-talk-client"
2+
name = "null-talk"
33
version = "2.0.0"
44
edition = "2024"
55
authors = ["ByteMaster2003 <viveksahani39266@gmail.com>"]

client/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clap::Parser;
2-
use client::{
2+
use null_talk::{
33
config, data,
44
net::{handle_client, tcp::open_tcp_stream},
55
types::ChannelRegistry,

server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use clap::Parser;
2-
use server::{
2+
use null_talk_server::{
33
config,
44
data::{self},
55
net::{handle_client, tls::create_tls_acceptor},

0 commit comments

Comments
 (0)