Skip to content

Commit

Permalink
ci: add build workflow (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-hunhoff authored Feb 2, 2024
1 parent a1acc42 commit b26f13a
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on:
release:
types: [published]

jobs:

release:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- jep-jar-release-url: "https://github.com/ninia/jep/releases/download/v4.2.0/jep-4.2.0.jar"
ghidra-release-url: "https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.0_build/ghidra_11.0_PUBLIC_20231222.zip"
steps:
- name: Checkout Ghidrathon
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: "7.3"
- name: Configure temp folder
run: mkdir ../tmp
- name: Download Ghidra
run: |
wget ${{ matrix.ghidra-release-url }} -O ../tmp/ghidra.zip
unzip ../tmp/ghidra.zip -d ../tmp/ghidra
mv ../tmp/ghidra/$(ls ../tmp/ghidra) ../tmp/ghidra/ghidra_PUBLIC
- name: Download Jep
run: wget ${{ matrix.jep-jar-release-url }} -O ./lib/jep-4.2.0.jar
- name: Set zip name
run: echo "zip_name=Ghidrathon-${GITHUB_REF#refs/tags/}.zip" >> $GITHUB_ENV
- name: Build Ghidrathon
run: gradle -PGHIDRA_INSTALL_DIR=${{ github.workspace }}/../tmp/ghidra/ghidra_PUBLIC
- name: Configure and zip
run: |
mv ./dist/$(ls ./dist) ./dist/${{ env.zip_name }}
cp ./util/* ./dist
(cd ./dist && zip -r ../${{ env.zip_name }} .)
- name: Upload ${{ env.zip_name }} to GH Release
uses: svenstaro/upload-release-action@2728235f7dc9ff598bd86ce3c274b74f802d2208 # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN}}
file: ${{ env.zip_name }}
tag: ${{ github.ref }}

0 comments on commit b26f13a

Please sign in to comment.