Repository navigation
116 lines (95 loc) · 3.03 KB
/
Copy pathbuild.yml
File metadata and controls
116 lines (95 loc) · 3.03 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Build & Release
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
# Required permissions for creating releases
permissions:
contents: write
jobs:
lint:
name: Clippy & Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Tests
run: cargo test --all-targets
build-and-release:
name: Build ${{ matrix.os }}
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: phantomftp
asset_name: phantomftp-linux-amd64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: phantomftp.exe
asset_name: phantomftp-windows-amd64.exe
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
- name: Build
run: cargo build --release --target ${{ matrix.target }}
# Build .deb package for Linux only
- name: Install cargo-deb
if: matrix.os == 'ubuntu-latest'
run: cargo install cargo-deb
- name: Build .deb
if: matrix.os == 'ubuntu-latest'
run: cargo deb
# Upload directly to GitHub Release (only on tags)
- name: Upload Linux binary to Release
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
uses: softprops/action-gh-release@v1
with:
name: 'PhantomFTP ${{ github.ref_name }}'
body: |
## PhantomFTP ${{ github.ref_name }}
A cyberpunk-inspired Terminal FTP Client built in Rust.
### Features
- FTP and FTPS (Explicit TLS) support
- Dual-panel file browser (remote/local)
- Asynchronous streaming transfers with progress tracking
- Transfer cancellation and retry mechanism
- AeroFTP server import
- CyberPunk terminal aesthetics
### Downloads
- **Linux**: `phantomftp-linux-amd64` (binary) or `.deb` package
- **Windows**: `phantomftp-windows-amd64.exe`
draft: false
prerelease: false
files: |
target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
target/debian/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows binary to Release
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
uses: softprops/action-gh-release@v1
with:
files: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}