-
Notifications
You must be signed in to change notification settings - Fork 17
64 lines (52 loc) · 1.53 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build_extension:
runs-on: ubuntu-latest
strategy:
matrix:
ghidra: ['11.2']
java: ['21']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get short SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Setup Ghidra
uses: er28-0652/setup-ghidra@master
with:
version: ${{ matrix.ghidra }}
- name: bodge
run: chmod +x gradlew
- name: Build Extension
run: ./gradlew
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Ps3GhidraScripts_${{ matrix.ghidra }}
path: dist
retention-days: 7
if-no-files-found: error
push_release:
if: |
github.event_name == 'push' &&
github.repository == 'clienthax/Ps3GhidraScripts'
needs: build_extension
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create 1.0${{ GITHUB.RUN_NUMBER }} artifacts/*.zip --target ${{ GITHUB.SHA }} -t 1.0${{ GITHUB.RUN_NUMBER }}