Skip to content

Commit 787a584

Browse files
committed
squashed: github actions
wip location wip fetch deps try downloading artifact WIP multiple files wildcard display back to WIP which did find an artifact to download... one more all files run jobs in sequence try mac/win os-specific artifact name merge downloaded artifacts build for real wip debug build again wip WIP done?
1 parent 2b8de0d commit 787a584

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: release
2+
on:
3+
workflow_dispatch: # allow to manually trigger this workflow
4+
# push:
5+
# branches:
6+
# - master
7+
jobs:
8+
build_natives:
9+
runs-on: ${{matrix.os}}
10+
strategy:
11+
matrix:
12+
os: [macos-latest, windows-latest]
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Set up JDK
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: temurin
21+
java-version: 21
22+
- name: Setup Gradle
23+
uses: gradle/actions/setup-gradle@v4
24+
- run: gradle -I gradle/support/fetchDependencies.gradle buildNatives
25+
- name: Upload platform-specific binaries
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: ${{matrix.os}}
29+
path: |
30+
GPL/DemanglerGnu/build/os/*
31+
Ghidra/Features/Decompiler/build/os/*
32+
Ghidra/Features/FileFormats/build/os/*
33+
build_ghidra:
34+
needs: build_natives
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
- name: Set up JDK
41+
uses: actions/setup-java@v4
42+
with:
43+
distribution: temurin
44+
java-version: 21
45+
- name: Setup Gradle
46+
uses: gradle/actions/setup-gradle@v4
47+
- uses: actions/download-artifact@v4
48+
with:
49+
merge-multiple: true
50+
- run: git log -1 --pretty=format:%h
51+
- name: List native binaries
52+
run: tree GPL/DemanglerGnu/build/os Ghidra/Features/Decompiler/build/os Ghidra/Features/FileFormats/build/os
53+
- name: Build release ghidra, all the way to maven central
54+
run: ./ghidra-publish.sh --non-interactive

ghidra-publish.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# on github actions we want to bypass user confirmation via --non-interactive
4+
NON_INTERACTIVE_OPTION=$1
5+
36
# before we start: ensure that everything is committed and the git index is clean:
47
# exit code is 1 if there are changes
58
git diff-files --quiet
@@ -23,8 +26,11 @@ bold=$(tput bold)
2326
normal=$(tput sgr0)
2427
echo "Ready to start ghidra build and maven central release for version ${bold}${FULL_VERSION}${normal}"
2528
echo "We'll remove the build directory, i.e. files from old releases will be deleted."
26-
echo "Press ${bold}ENTER${normal} to proceed."
27-
read CONFIRM
29+
if [ "$NON_INTERACTIVE_OPTION" != "--non-interactive" ]
30+
then
31+
echo "Press ${bold}ENTER${normal} to proceed."
32+
read CONFIRM
33+
fi
2834

2935
# clean everything to be on the safe side
3036
rm -rf build

0 commit comments

Comments
 (0)