Skip to content

Tweak GitHub Actions workflow so Ghidra recognizes artifact files as … #19

Tweak GitHub Actions workflow so Ghidra recognizes artifact files as …

Tweak GitHub Actions workflow so Ghidra recognizes artifact files as … #19

Workflow file for this run

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/[email protected]
- name: Install Ghidra ${{ matrix.ghidra }}
uses: antoniovazquezblanco/[email protected]
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 }}