forked from HyperDbg/gui
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (80 loc) · 2.78 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Pre-release HyperDbg and GUI
on:
push:
branches:
- main
tags:
- v*.**
- weekly.**
- 0.**
env:
RELEASE_ZIP_FILE_NAME: HyperDbg
jobs:
test-on-multiple-os:
name: Test on multiple OS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23.0'
- name: Install GCC on Windows
run: choco install mingw
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...
- name: Build project
run: go build -x .
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3 # 上传生成的文件
with:
name: gui-executable
path: gui.exe # 指定需要上传的可执行文件路径
- name: Debug - Check GITHUB_REF
run: |
echo "GITHUB_REF is: ${{ github.ref }}"
echo "GITHUB_EVENT_REF is: ${{ github.event.ref }}"
package-and-release:
needs: test-on-multiple-os
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23.0'
- name: Install GCC on Windows
run: choco install mingw
- name: Install dependencies
run: go mod tidy
- name: Build project
run: go build -x .
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.0'
- name: Install GitHub Changelog Generator
run: gem install github_changelog_generator
- name: Generate Changelog
run: github_changelog_generator --user ${{ github.repository_owner }} --project ${{ github.event.repository.name }} --token ${{ secrets.GITHUB_TOKEN }}
- name: Create source code archive
run: powershell -Command "Get-ChildItem -Recurse | Where-Object { $_.FullName -notmatch '\.git' -and $_.Extension -notmatch '\.dll|\.sys|\.exe' } | Compress-Archive -DestinationPath ${env:RELEASE_ZIP_FILE_NAME}-${{ github.ref_name }}.zip -CompressionLevel Optimal"
- name: Create binaries archive
run: powershell -Command "Get-ChildItem -Recurse -Include 'hyperdbgui.exe' | Compress-Archive -DestinationPath binaries-${{ github.ref_name }}.zip"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.RELEASE_ZIP_FILE_NAME }}-${{ github.ref_name }}.zip
binaries-${{ github.ref_name }}.zip
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.tk }}