-
Notifications
You must be signed in to change notification settings - Fork 91
112 lines (108 loc) · 3.86 KB
/
ja4-wireshark-release.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: ja4-wireshark-release
on:
push:
branches: [main]
paths: [wireshark/*, wireshark/source/*, wireshark/build-scripts/*]
workflow_dispatch:
jobs:
wireshark-linux:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
run: cd wireshark/build-scripts && sudo apt update -y && sudo apt install ninja-build -y && sudo ./linux_build.sh 4.4.0
- name: rename artifact
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/plugins/4.4/epan/ja4.so ja4.so.linux
- name: upload-linux-ja4
uses: actions/upload-artifact@v4
with:
name: linux-ja4
path: ja4.so.linux
wireshark-macos:
runs-on: macOS-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
run: cd wireshark/build-scripts && ./macos_build.sh 4.4.0
- name: rename artifact
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/Wireshark.app/Contents/PlugIns/wireshark/4-4/epan/ja4.so ja4.so.macos
- name: upload-macos-ja4
uses: actions/upload-artifact@v4
with:
name: macos-ja4
path: ja4.so.macos
wireshark-windows:
runs-on: windows-2022
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:\Development
CMAKE_PREFIX_PATH: D:\a\ja4\Qt\6.2.3\msvc2019_64
WIRESHARK_VERSION_EXTRA: -GithubActionBuild
steps:
- name: checkout
uses: actions/checkout@v4
- name: create wireshark directory
run: mkdir wireshark/build-scripts/wireshark
- name: checkout wireshark
uses: actions/checkout@v4
with:
repository: wireshark/wireshark
ref: release-4.4
path: wireshark/build-scripts/wireshark
- name: add ja4 plugin
run: copy -r wireshark/source wireshark/build-scripts/wireshark/plugins/epan/ja4
- name: Choco install dependencies
run: choco install -y asciidoctorj xsltproc docbook-bundle nsis winflexbison3 cmake
- name: Install strawberryperl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.30'
distribution: strawberry
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: win64_msvc2019_64
version: 6.2.3
modules: 'qt5compat'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-version: 16.8
- name: Set MSVC command prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Mkdir build directory and copy sources
run: mkdir wireshark/build-scripts/wireshark/build
- name: Cmake
run: cd wireshark/build-scripts/wireshark/build && cmake -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/ja4 -DCMAKE_SYSTEM_VERSION="10.0.20348.0" -A x64 ..
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:/wireshark-libs
QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
working-directory: wireshark/build-scripts/wireshark/build
- name: Build
run: cmake --build . --config RelWithDebInfo
working-directory: wireshark/build-scripts/wireshark/build
- name: rename artifact
run: cp wireshark/build-scripts/wireshark/build/run/RelWithDebInfo/plugins/4.4/epan/ja4.dll ja4.dll
- name: upload-windows-ja4
uses: actions/upload-artifact@v4
with:
name: windows-ja4
path: ja4.dll
release-artifacts:
runs-on: ubuntu-latest
needs: [ wireshark-linux, wireshark-macos, wireshark-windows ]
steps:
- name: set env
run: echo "NOW=$(date +'%Y.%m.%d.%M')" >> $GITHUB_ENV
- name: download-artifacts
uses: actions/download-artifact@v4
- name: list files
run: ls -al
- name: release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release create ja4-wireshark-plugins-${{ env.NOW }} linux-ja4/ja4.so.linux macos-ja4/ja4.so.macos windows-ja4/ja4.dll