Skip to content

Commit e66b38b

Browse files
committed
Add GitHub Actions workflow for cross-platform builds
- Automated builds for Windows x64, Linux x64, and macOS x64 - Creates artifacts for each platform - Automatic releases on version tags - Updated Cargo.toml with crates.io metadata
1 parent 1370cd8 commit e66b38b

2 files changed

Lines changed: 101 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
build:
15+
name: Build for ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
include:
20+
- os: windows-latest
21+
target: x86_64-pc-windows-msvc
22+
executable_suffix: .exe
23+
artifact_name: tl-windows-x64
24+
- os: ubuntu-latest
25+
target: x86_64-unknown-linux-gnu
26+
executable_suffix: ""
27+
artifact_name: tl-linux-x64
28+
- os: macos-latest
29+
target: x86_64-apple-darwin
30+
executable_suffix: ""
31+
artifact_name: tl-macos-x64
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install Rust
37+
uses: dtolnay/rust-toolchain@stable
38+
with:
39+
targets: ${{ matrix.target }}
40+
41+
- name: Cache cargo registry
42+
uses: actions/cache@v4
43+
with:
44+
path: |
45+
~/.cargo/registry
46+
~/.cargo/git
47+
target
48+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-cargo-
51+
52+
- name: Build release binary
53+
run: cargo build --release --target ${{ matrix.target }}
54+
55+
- name: Create artifact directory
56+
shell: bash
57+
run: |
58+
mkdir -p artifacts
59+
cp target/${{ matrix.target }}/release/tl${{ matrix.executable_suffix }} artifacts/
60+
cp README.md artifacts/
61+
cp Cargo.toml artifacts/
62+
63+
- name: Upload artifact
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: ${{ matrix.artifact_name }}
67+
path: artifacts/
68+
69+
release:
70+
name: Create Release
71+
needs: build
72+
runs-on: ubuntu-latest
73+
if: startsWith(github.ref, 'refs/tags/v')
74+
75+
steps:
76+
- name: Download all artifacts
77+
uses: actions/download-artifact@v4
78+
with:
79+
path: artifacts
80+
81+
- name: Create zip files
82+
run: |
83+
cd artifacts
84+
for dir in */; do
85+
zip -r "${dir%/}.zip" "$dir"
86+
done
87+
88+
- name: Create Release
89+
uses: softprops/action-gh-release@v1
90+
with:
91+
files: artifacts/*.zip
92+
generate_release_notes: true
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ name = "tl"
33
version = "0.1.0"
44
edition = "2021"
55
authors = ["Albert Hui <albert@securityronin.com>"]
6-
description = "tl (Timeline) - A fast CLI tool for parsing NTFS Master File Table"
6+
description = "Ultra-fast NTFS MFT parser with interactive TUI timeline viewer. High-performance parallel processing with SIMD optimizations, memory mapping, and advanced caching for forensic timeline analysis."
77
license = "MIT"
8+
repository = "https://github.com/h4x0r/tl"
9+
homepage = "https://github.com/h4x0r/tl"
10+
documentation = "https://docs.rs/tl"
11+
readme = "README.md"
12+
keywords = ["forensics", "mft", "ntfs", "timeline", "parser"]
13+
categories = ["command-line-utilities", "parsing", "development-tools"]
814

915
[[bin]]
1016
name = "tl"

0 commit comments

Comments
 (0)