Skip to content

Commit

Permalink
Merge pull request #18 from clienthax/revert-16-ci
Browse files Browse the repository at this point in the history
Revert "CI updates"
  • Loading branch information
clienthax authored Jun 5, 2022
2 parents 99207dc + fc90d0c commit 6c0264f
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,36 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build_extension:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghidra: [latest, 10.1.2, 10.1.1, 10.1]
ghidra: ['10.0.4', '10.1.1', '10.1.2']

steps:
- name: Set Ghidra version
id: ghidra_version
run: |
if [ ${{ matrix.ghidra }} = latest ]; then
ghidra_version=$(curl -fLsSo /dev/null -w %{url_effective} https://github.com/NationalSecurityAgency/ghidra/releases/latest |
grep -oP '(?<=https://github.com/NationalSecurityAgency/ghidra/releases/tag/Ghidra_).+(?=_build)')
echo "::set-output name=full::$ghidra_version"
else
echo "::set-output name=full::${{ matrix.ghidra }}"
fi
- name: Checkout
uses: actions/checkout@v3

- name: Get short SHA
run: echo "SHORT_SHA=${GITHUB_SHA:0:7}" >> $GITHUB_ENV

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Setup Ghidra
uses: er28-0652/setup-ghidra@master
with:
version: ${{ steps.ghidra_version.outputs.full }}
version: ${{ matrix.ghidra }}

- name: Build Extension
run: gradle
- name: Prepare artifact
id: artifact
working-directory: dist
run: |
ghidra_zip=$(basename ghidra*.zip)
7z x "$ghidra_zip" -o../artifacts
echo "::set-output name=name::${ghidra_zip//.zip}"

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact.outputs.name }}
path: artifacts
if-no-files-found: error
path: dist/
retention-days: 7

push_release:
Expand All @@ -57,9 +45,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifacts
uses: actions/download-artifact@v3

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create 1.0${{ GITHUB.RUN_NUMBER }} artifact/*.zip --target ${{ GITHUB.SHA }} -t 1.0${{ GITHUB.RUN_NUMBER }}

0 comments on commit 6c0264f

Please sign in to comment.