-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (60 loc) · 1.91 KB
/
pre-release.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
65
66
67
68
69
70
71
72
73
74
75
76
name: Pre-release HyperDbg and GUI
on:
push:
branches:
- main
tags:
- 'v*.*.*-pre.*'
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run Go unit tests
run: go test ./...
build-and-release:
runs-on: windows-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Clone HyperDbg repository
run: git clone --recursive https://github.com/HyperDbg/HyperDbg.git
- name: Build HyperDbg
run: HyperDbg/utils/msvc-build.bat
- name: Remove unnecessary files
run: |
Get-ChildItem -Path bin/debug -Recurse | Where-Object { $_.Extension -in @(".pdb", ".exp", ".lib") } | Remove-Item -Force
- name: Build GUI
run: go build .
- name: Copy GUI executable to debug directory
run: Copy-Item hyperdbgui.exe bin/debug
- name: Create release archive
run: tar -zcvf hyperdbgui.tar.gz bin/debug
- name: Upload release artifact
uses: actions/upload-artifact@v2
with:
name: hyperdbgui-prerelease
path: hyperdbgui.tar.gz
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Pre-release ${{ github.ref }}
draft: false
prerelease: true
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hyperdbgui.tar.gz
asset_name: hyperdbgui.tar.gz
asset_content_type: application/gzip
- name: Clean up
run: Remove-Item -Recurse -Force bin