Skip to content

Commit

Permalink
Support platform specifc and building of all installers
Browse files Browse the repository at this point in the history
by github action

Signed-off-by: Florian Esser <[email protected]>
  • Loading branch information
florianesser-tng committed Nov 21, 2024
1 parent 956981f commit b2d53f3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/build-installer.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: build installer

run-name: installer-build-${{ github.sha }}
run-name: installer-build-${{ inputs.platform }}-${{ github.sha }}

on:
workflow_dispatch:

inputs:
platform:
type: choice
description: installer(s) to build
required: true
options:
- arc
- ultra
- ultra2
- all
jobs:
build:
runs-on: windows-latest
Expand Down Expand Up @@ -48,22 +57,24 @@ jobs:
npm run fetch-build-resources
npm run pack-python
npm run prebuild
npm run build:arc
npm run build:${{ inputs.platform }}
- name: set release path
working-directory: "release"
run: |
echo "INSTALLER_EXE_PATH=$(Get-ChildItem -Path . -Filter *.exe | Select-Object -ExpandProperty FullName)"
echo "INSTALLER_EXE_PATH=$(Get-ChildItem -Path . -Filter *.exe | Select-Object -ExpandProperty FullName)" >> $env:GITHUB_ENV
echo "RELEASE_DIR=$((pwd).Path)"
echo "RELEASE_DIR=$((pwd).Path)" >> $env:GITHUB_ENV
- uses: actions/upload-artifact@v4
- name: upload single release
uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
# Optional. Default is 'artifact'
name: arc-installer-windows.exe
name: "${{ inputs.platform }}_installers"
# A file, directory or wildcard pattern that describes what to upload
# Required.
path: ${{ env.INSTALLER_EXE_PATH }}
path: ${{ env.RELEASE_DIR }}\*.exe
if-no-files-found: error
retention-days: 1
overwrite: true

2 changes: 1 addition & 1 deletion WebUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"pack-offline": "cross-env node build/scripts/pack-offline.js ./package_res",
"pack-python": "cross-env node build/scripts/pack-python.js ../python_package_res ./npm_package_res",
"prebuild": "cross-env node build/scripts/prebuild.js ./npm_package_res ../service ./external",
"build": "cross-env npm run prebuild && npm run build:arc && npm run build:ultra && npm run build:ultra2",
"build:all": "cross-env npm run prebuild && npm run build:arc && npm run build:ultra && npm run build:ultra2",
"build:arc": "cross-env-shell PLATFORM=\"arc\" VITE_PLATFORM_TITLE=\"for Intel® Arc™\" \"vue-tsc && vite build && node ./build/scripts/render-template.js && electron-builder --config build/build-config.json --win --x64\"",
"build:ultra": "cross-env-shell PLATFORM=\"ultra\" VITE_PLATFORM_TITLE=\"for Intel® Core™ Ultra\" \"vue-tsc && vite build && node ./build/scripts/render-template.js && electron-builder --config build/build-config.json --win --x64\"",
"build:ultra2": "cross-env-shell PLATFORM=\"ultra2\" VITE_PLATFORM_TITLE=\"for Intel® Core™ Ultra Series 2\" \"vue-tsc && vite build && node ./build/scripts/render-template.js && electron-builder --config build/build-config.json --win --x64\"",
Expand Down

0 comments on commit b2d53f3

Please sign in to comment.