Skip to content

Commit 51c3584

Browse files
committed
ci: test release
1 parent d772f19 commit 51c3584

File tree

2 files changed

+26
-40
lines changed

2 files changed

+26
-40
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,9 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
build-and-release:
13-
name: Build & Release (${{ matrix.os }})
14-
runs-on: ${{ matrix.os }}
15-
16-
strategy:
17-
matrix:
18-
include:
19-
# -----------------------------------------------
20-
# Linux build temporarily disabled — uncomment when Linux modules are added
21-
# - os: ubuntu-latest
22-
# target: x86_64-unknown-linux-gnu
23-
# artifact_ext: tar.gz
24-
# archive_cmd: tar -czvf
25-
# binary_ext: ""
26-
# -----------------------------------------------
27-
- os: windows-latest
28-
target: x86_64-pc-windows-msvc
29-
artifact_ext: zip
30-
archive_cmd: powershell Compress-Archive -Path
31-
binary_ext: ".exe"
12+
release-windows:
13+
name: Build & Release (Windows)
14+
runs-on: windows-latest
3215

3316
steps:
3417
- name: Checkout source
@@ -37,30 +20,24 @@ jobs:
3720
- name: Install Rust
3821
uses: dtolnay/rust-toolchain@stable
3922

40-
- name: Build release binary
41-
run: cargo build --release --target ${{ matrix.target }}
23+
- name: Build Windows binary
24+
run: cargo build --release --target x86_64-pc-windows-msvc
4225

43-
- name: Prepare release assets
26+
- name: Prepare release package
4427
run: |
4528
mkdir release
46-
cp README.md release/ 2> NUL || true
47-
if [ "${{ matrix.os }}" = "Windows_NT" ]; then
48-
# Windows build packaging
49-
powershell Copy-Item "target\\${{ matrix.target }}\\release\\magnet.exe" release\\
50-
powershell Compress-Archive -Path release\\* -DestinationPath magnet-${{ github.ref_name }}-windows-x86_64.zip
51-
else
52-
# Linux build packaging (currently disabled)
53-
cp target/${{ matrix.target }}/release/magnet release/
54-
tar -czvf magnet-${{ github.ref_name }}-linux-x86_64.tar.gz -C release .
55-
fi
56-
shell: bash
29+
copy README.md release\
30+
copy target\x86_64-pc-windows-msvc\release\magnet.exe release\
31+
powershell Compress-Archive -Path release\* -DestinationPath magnet-${{ github.ref_name }}-windows-x86_64.zip
32+
shell: cmd
33+
34+
- name: Show files for debug
35+
run: dir
36+
shell: cmd
5737

58-
- name: Upload release asset
38+
- name: Upload compiled binary to release
5939
uses: softprops/action-gh-release@v2
6040
with:
61-
files: |
62-
# magnet-${{ github.ref_name }}-linux-x86_64.tar.gz
63-
magnet-${{ github.ref_name }}-windows-x86_64.zip
41+
files: magnet-${{ github.ref_name }}-windows-x86_64.zip
6442
env:
6543
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
if: matrix.os == 'windows-latest' # only upload once (Windows)

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ This module demonstrates its value for testing detection rules and behavioral an
3838

3939
## Quickstart
4040

41-
Compile:
41+
Donwload the release from github:
42+
```bash
43+
curl -L -o magnet.zip https://github.com/r3drun3/magnet/releases/latest/download/magnet-windows-x86_64.zip
44+
Expand-Archive magnet.zip -DestinationPath magnet
45+
cd magnet
46+
```
47+
48+
49+
50+
Compile locally:
4251

4352
For Windows:
4453
```bash

0 commit comments

Comments
 (0)