-
Notifications
You must be signed in to change notification settings - Fork 9
94 lines (84 loc) · 2.71 KB
/
build.yml
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
name: Build
on:
push:
pull_request:
jobs:
build:
name: Build
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
component: [shellcode_utils, impersonate, solstice_loader, shellcode_stage1, shellcode_stage1_network, shellcode_stage2, shellcode_gen, solstice_daemon, payload_server]
include:
- component: solstice_daemon
features: firewall
test: true
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Test ${{ matrix.component }}
if: ${{ matrix.test }}
working-directory: crates/${{ matrix.component }}
run: cargo test --release --features=${{ matrix.features }}
- name: Build ${{ matrix.component }}
working-directory: crates/${{ matrix.component }}
run: cargo build --release --features=${{ matrix.features }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Binaries-${{ matrix.component }}
path: |
README.md
LICENSE
crates/${{ matrix.component }}/target/release/${{ matrix.component }}.exe
crates/${{ matrix.component }}/target/x86_64-pc-windows-msvc/release/${{ matrix.component }}.exe
generate:
name: Generate payloads
runs-on: windows-latest
needs: build
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: .
pattern: Binaries-*
merge-multiple: true
- name: Create output dir
run: mkdir output
- name: Generate payloads
working-directory: crates\shellcode_gen
run: |
.\target\release\shellcode_gen.exe ${{ github.workspace }}\output\
- name: Copy artifact binaries to output directory
run: |
xcopy README.md output\
xcopy LICENSE output\
xcopy crates\solstice_daemon\target\release\solstice_daemon.exe output\
xcopy crates\payload_server\target\release\payload_server.exe output\
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Release
path: |
output\**
bundle:
name: Bundle
runs-on: windows-latest
needs: [generate]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Release
path: release\
- name: Bundle binaries
run: 7z a -tzip Solstice.zip .\release\**
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: Solstice.zip