Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Upgrade to 10.1 and create releases #7

Merged
merged 6 commits into from
Dec 21, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 49 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and publish
name: Build and Publish
illusion0001 marked this conversation as resolved.
Show resolved Hide resolved

on: [push, pull_request]

Expand All @@ -7,46 +7,83 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ghidra: ["10.0.4"]
ghidra: ['10.1']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well bump this up to 10.1.1 now if you can for the full log4shell mitigation (hopefully)

steps:
- uses: actions/checkout@v2
illusion0001 marked this conversation as resolved.
Show resolved Hide resolved

- uses: actions/setup-java@main
illusion0001 marked this conversation as resolved.
Show resolved Hide resolved
with:
java-version: '11'
java-package: jdk
architecture: x64
distribution: 'temurin'
java-version: 11
distribution: temurin

- name: Get shortened SHA
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
illusion0001 marked this conversation as resolved.
Show resolved Hide resolved

- uses: er28-0652/setup-ghidra@master
with:
version: ${{ matrix.ghidra }}

- uses: actions/checkout@v2
with:
repository: astrelsky/Ghidra-Cpp-Class-Analyzer
path: Ghidra-Cpp-Class-Analyzer

- uses: eskatos/gradle-command-action@v2
with:
gradle-version: 6.9
build-root-directory: Ghidra-Cpp-Class-Analyzer
arguments: buildExtension -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }}

- name: Install the class analyzer as an extension forcefully
run: |
mkdir -p ~/.ghidra/.ghidra_${{ matrix.ghidra }}_PUBLIC/Extensions/
unzip Ghidra-Cpp-Class-Analyzer/dist/*.zip -d ~/.ghidra/.ghidra_${{ matrix.ghidra }}_PUBLIC/Extensions/

- name: Make artifact single zip
run: |
mkdir Ghidra-Cpp-Class-Analyzer/dist/bin
unzip Ghidra-Cpp-Class-Analyzer/dist/*.zip -d Ghidra-Cpp-Class-Analyzer/dist/bin

- uses: actions/upload-artifact@v2
with:
name: Ghidra-Cpp-Class-Analyzer
path: Ghidra-Cpp-Class-Analyzer/dist/*.zip
if-no-files-found: warn
name: Ghidra-Cpp-Class-Analyzer_${{ matrix.ghidra }}_${{ env.SHORT_SHA }}
path: Ghidra-Cpp-Class-Analyzer/dist/bin/*

- uses: svenstaro/upload-release-action@1d71c233f746f1dbd928efaf6de63056aa65f6eb
if: github.event_name != 'pull_request'
with:
release_name: Release for ${{ matrix.ghidra }} - ${{ env.SHORT_SHA }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Ghidra-Cpp-Class-Analyzer/dist/*.zip
tag: ${{ env.SHORT_SHA }}
overwrite: true
file_glob: true

- name: Cleanup
run: rm -rf Ghidra-Cpp-Class-Analyzer

- uses: eskatos/gradle-command-action@v2
with:
gradle-version: 6.9
arguments: buildExtension -PGHIDRA_INSTALL_DIR=${{ env.GHIDRA_INSTALL_DIR }}

- name: Make artifact single zip
run: |
mkdir dist/bin
unzip dist/*.zip -d dist/bin

- uses: actions/upload-artifact@v2
with:
name: GhidraOrbis
path: dist/*.zip
if-no-files-found: warn
name: GhidraOrbis_${{ matrix.ghidra }}_${{ env.SHORT_SHA }}
path: dist/bin/*

- uses: svenstaro/upload-release-action@1d71c233f746f1dbd928efaf6de63056aa65f6eb
illusion0001 marked this conversation as resolved.
Show resolved Hide resolved
if: github.event_name != 'pull_request'
with:
release_name: Release for ${{ matrix.ghidra }} - ${{ env.SHORT_SHA }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ env.SHORT_SHA }}
overwrite: true
file_glob: true