Skip to content

Commit

Permalink
workflow update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanxven committed Jan 25, 2025
1 parent 7a8c356 commit bc94481
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- dev
- refactor
workflow_dispatch:

jobs:
build:
runs-on: windows-2022
Expand All @@ -23,21 +23,21 @@ jobs:
run: |
$json = Get-Content package.json -Raw | ConvertFrom-Json
$json.version += "+$env:SHORT_SHA"
$json | ConvertTo-Json | Set-Content package.json
$json | ConvertTo-Json | Set-Content package.json
- name: Modify electron-builder.yml
shell: pwsh
run: |
$yamlContent = Get-Content -Path electron-builder.yml -Raw
$yamlContent = $yamlContent -replace "target: 7z", "target: dir"
Set-Content -Path electron-builder.yml -Value $yamlContent
Set-Content -Path electron-builder.yml -Value $yamlContent
- name: Get final akari version
run: |
$AKARI_VERSION = (Get-Content package.json | ConvertFrom-Json).version
echo "akari_version=$AKARI_VERSION" >> $env:GITHUB_ENV
# Build
# Build
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -52,17 +52,13 @@ jobs:
run: npm i node-gyp -g

- name: Build C++ addons
run: |
$addons = Get-ChildItem -Directory .\addons
Write-Host "Found addons: $($addons.Count)"
$addons | ForEach-Object -Process {
Write-Host "Processing addon: $($_.FullName)"
Set-Location $_.FullName
node-gyp configure
node-gyp build
Set-Location -Path ..\..
Copy-Item -Path "$($_.FullName)\build\Release\*.node" -Destination .\src\main\native -Force
}
run: |
Write-Host "Processing addon: .\addons"
Set-Location addons
node-gyp configure
node-gyp build
Set-Location ..
Copy-Item -Path "addons\build\Release\*.node" -Destination .\src\main\native -Force
- name: Run yarn build:win
uses: borales/[email protected]
Expand Down

0 comments on commit bc94481

Please sign in to comment.