-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (47 loc) · 1.66 KB
/
build.yml
File metadata and controls
57 lines (47 loc) · 1.66 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
name: Build and Release GhostInjector
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64
- name: Configure CMake
run: |
cmake -B build -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw.cmake -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Strip executable
run: x86_64-w64-mingw32-strip build/ghostinjector-*.exe
- name: Rename executable
run: mv build/ghostinjector-*.exe build/ghostinjector.exe
- name: Create Release
if: (github.ref == 'refs/heads/main' && github.event_name == 'push') || startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ (github.ref == 'refs/heads/main' && 'latest') || github.ref_name }}
name: ${{ (github.ref == 'refs/heads/main' && 'Latest Build (Development)') || github.ref_name }}
body: |
## 🚀 Latest Development Build
**Commit:** ${{ github.sha }}
### 📥 Download
- **Windows:** `ghostinjector.exe`
files: build/ghostinjector.exe
draft: false
prerelease: ${{ github.ref == 'refs/heads/main' }}
make_latest: ${{ github.ref == 'refs/heads/main' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}