Skip to content

Build OpenSpeedy

Build OpenSpeedy #56

Workflow file for this run

name: Build OpenSpeedy
on:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
outputs:
artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build 32-bit
shell: cmd
run: |
echo Building 32-bit...
call script\initenv.bat
call script\build32.bat
- name: Build 64-bit
shell: cmd
run: |
echo Building 64-bit...
call script\initenv.bat
call script\build64.bat
- name: Collect artifacts to flat directory
shell: cmd
run: |
echo Collecting artifacts...
if not exist "artifacts" mkdir "artifacts"
rem 复制文件到平级目录,去除路径结构
if exist "build\CMAKE-64bit-Release\OpenSpeedy.exe" copy "build\CMAKE-64bit-Release\OpenSpeedy.exe" "artifacts\"
if exist "build\CMAKE-64bit-Release\speedpatch64.dll" copy "build\CMAKE-64bit-Release\speedpatch64.dll" "artifacts\"
if exist "build\CMAKE-64bit-Release\bridge64.exe" copy "build\CMAKE-64bit-Release\bridge64.exe" "artifacts\"
if exist "build\CMAKE-32bit-Release\speedpatch32.dll" copy "build\CMAKE-32bit-Release\speedpatch32.dll" "artifacts\"
if exist "build\CMAKE-32bit-Release\bridge32.exe" copy "build\CMAKE-32bit-Release\bridge32.exe" "artifacts\"
echo Artifacts directory contents:
dir "artifacts"
- name: Upload unsigned artifacts
id: upload-unsigned-artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: OpenSpeedy-unsigned-artifacts
path: artifacts/
if-no-files-found: warn
# sign:
# runs-on: windows-latest # 签名在 GitHub-hosted
# needs: build
# steps:
# - name: SignPath signing
# uses: signpath/github-action-submit-signing-request@v1.1
# with:
# api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
# organization-id: '58b9835d-38ea-4898-a564-76610c01cecd'
# project-slug: OpenSpeedy
# signing-policy-slug: test-signing
# github-artifact-id: ${{ needs.build.outputs.artifact-id }}
# wait-for-completion: true
# output-artifact-directory: signed-artifacts/
# - name: Upload signed artifacts
# uses: actions/upload-artifact@v4
# with:
# name: OpenSpeedy-signed-artifacts
# path: signed-artifacts/