-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (65 loc) · 2.02 KB
/
Copy pathbuild.yml
File metadata and controls
80 lines (65 loc) · 2.02 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: build
on:
push:
branches: [main]
tags: ['*']
pull_request:
workflow_dispatch:
env:
IDASDK_REF: d5db59ab4e9d2ae92038e9520082affd0da6fe20
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact: linux-x64
binary: build/ida_plugins/ida_discord_rpc.so
- os: windows-latest
artifact: windows-x64
binary: build/ida_plugins/ida_discord_rpc.dll
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: HexRaysSA/ida-sdk
ref: ${{ env.IDASDK_REF }}
path: lib/ida-sdk
- if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y ninja-build
- if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build
- uses: actions/upload-artifact@v4
with:
name: ida_discord_rpc-${{ matrix.artifact }}
path: ${{ matrix.binary }}
if-no-files-found: error
release:
if: github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
- run: |
mkdir -p pkg/assets
cp ida-plugin.json pkg/
cp readme.md pkg/README.md
cp assets/ida-discord.png pkg/assets/
cp dist/ida_discord_rpc-linux-x64/ida_discord_rpc.so pkg/
cp dist/ida_discord_rpc-windows-x64/ida_discord_rpc.dll pkg/
cd pkg && zip -r "../ida_discord_rpc-${GITHUB_REF_NAME}.zip" . && cd ..
unzip -l ida_discord_rpc-*.zip
- run: pipx install ida-hcli
- run: hcli plugin lint "ida_discord_rpc-${GITHUB_REF_NAME}.zip"
- uses: softprops/action-gh-release@v2
with:
files: ida_discord_rpc-*.zip