Skip to content

Update win.yml

Update win.yml #71

Workflow file for this run

name: Build Windows Package
on: [workflow_dispatch, push]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- name: Setup MSBuild and Visual Studio 2022
uses: microsoft/setup-msbuild@v2
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: 22621
- name: Get Windows SDK Installation Path
run: |
$sdkVersion = "10.0.26100.0" # 对应于你的SDK版本
$registryPath = "HKLM:\Software\Microsoft\Windows Kits\Installed Roots"
$sdkInstallRoot = (Get-ItemProperty -Path $registryPath).KitsRoot10
if ($sdkInstallRoot) {
$sdkPath = Join-Path $sdkInstallRoot $sdkVersion
Write-Output "Windows SDK is installed at: $sdkPath"
} else {
Write-Error "Failed to find Windows SDK installation path."
}
shell: powershell
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
- name: Set JAVA_PATH and JNI Paths
run: |
echo "JAVA_HOME=$(dirname $(dirname $(which java)))" >> $GITHUB_ENV
echo "JNI_INCLUDE_PATH=$JAVA_HOME/include" >> $GITHUB_ENV
echo "JNI_INCLUDE_PATH2=$JAVA_HOME/include/win32" >> $GITHUB_ENV
echo "JNI_INCLUDE_DIRS=$JAVA_HOME/include;$JAVA_HOME/include/win32" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init
- name: Build Package
run: . ./buildjar.ps1
- uses: actions/upload-artifact@v2
with:
path: dist