Root project/plugin name #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: ['master'] | |
tags: ['*'] | |
pull_request: | |
permissions: | |
contents: write | |
env: | |
GHIDRA_DOWNLOAD_URL: https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_10.4_build/ghidra_10.4_PUBLIC_20230928.zip | |
GHIDRA_INSTALL_NAME: ghidra_10.4_PUBLIC | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Download and Extract Ghidra | |
run: | | |
cd "$RUNNER_TEMP" | |
curl -L "$GHIDRA_DOWNLOAD_URL" -o ghidra.zip | |
unzip -q ghidra.zip | |
# This is better than just running ./gradlew for reasons | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run Gradle | |
run: ./gradlew | |
env: | |
GHIDRA_INSTALL_DIR: ${{ runner.temp }}/${{ env.GHIDRA_INSTALL_NAME }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.zip | |
name: SuperMonkeyBallTools | |
- name: Rename Release Asset | |
if: github.ref_type == 'tag' | |
run: mv dist/*.zip dist/SuperMonkeyBallTools-${GITHUB_REF_NAME}-${GHIDRA_INSTALL_NAME}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.ref_type == 'tag' | |
with: | |
files: ./dist/*.zip | |
draft: true |