Skip to content

fix vite chunking for production (improved performance) #126

fix vite chunking for production (improved performance)

fix vite chunking for production (improved performance) #126

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to build from (e.g., v1.0.0)'
required: false
type: string
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
env:
npm_config_msvs_version: '2022'
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.inputs.tag || github.ref }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build native overlay addon
run: pnpm rebuild-native
- name: Fetch GCPad DLLs (Windows only)
if: runner.os == 'Windows'
run: node ./scripts/fetch-gcpad.cjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Overlay DLL (Windows only)
if: runner.os == 'Windows'
run: |
powershell -ExecutionPolicy Bypass -File overlay-dll/setup-minhook.ps1
cmake -B overlay-dll/build -S overlay-dll -G "Visual Studio 17 2022" -A x64
cmake --build overlay-dll/build --config Release
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Verify Overlay DLL output (Windows only)
if: runner.os == 'Windows'
shell: pwsh
run: |
if (!(Test-Path "overlay-dll/build/Release/uc-overlay-x64.dll")) {
throw "Expected overlay DLL at overlay-dll/build/Release/uc-overlay-x64.dll"
}
- name: Build application
run: pnpm -s build && pnpm exec electron-builder --publish=never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: false
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: |
dist-packaged/*.exe
dist-packaged/*.blockmap
dist-packaged/*.zip
dist-packaged/latest*.yml
dist-packaged/*.AppImage
dist-packaged/*.tar.gz
release:
needs: build
if: startsWith(github.ref, 'refs/tags/') || (github.event.inputs.tag != '')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist-packaged
- name: Create or Update Release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.tag || github.ref_name }}
allowUpdates: true
omitBodyDuringUpdate: true
replacesArtifacts: true
artifacts: |
dist-packaged/**/*.exe
dist-packaged/**/*.blockmap
dist-packaged/**/*.zip
dist-packaged/**/latest*.yml
dist-packaged/**/*.AppImage
dist-packaged/**/*.tar.gz
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}