-
Notifications
You must be signed in to change notification settings - Fork 11
59 lines (48 loc) · 1.66 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
name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghidra:
- "11.0.1"
- "11.0"
- "10.4"
- "10.3.3"
- "10.3.2"
- "10.3.1"
- "10.3"
steps:
- name: Clone Repository
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.11.1
- name: Install Ghidra ${{ matrix.ghidra }}
uses: antoniovazquezblanco/setup-ghidra@v1.2.0
with:
auth_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ matrix.ghidra }}
- name: Build the extension for Ghidra ${{ matrix.ghidra }}
run: gradle -PGHIDRA_INSTALL_DIR=${GHIDRA_INSTALL_DIR} -p GhidraNes
- name: Prepare artifact
id: prepare
run: |
original_filename="$(cd GhidraNes/dist && ls *.zip | head -n1)"
artifact_name="ghidra_${GHIDRA_VERSION}_$(git rev-parse --short HEAD)_$(date -u +'%Y%m%d')_GhidraNes"
echo "Renaming $original_filename to ${artifact_name}.zip"
mv "GhidraNes/dist/$original_filename" "GhidraNes/dist/${artifact_name}.zip"
echo "artifact-name=$artifact_name" >> "$GITHUB_OUTPUT"
echo "artifact-path=GhidraNes/dist/${artifact_name}.zip" >> "$GITHUB_OUTPUT"
env:
GHIDRA_VERSION: ${{ matrix.ghidra }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepare.outputs.artifact-name }}
path: ${{ steps.prepare.outputs.artifact-path }}