marshal Append #460
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |