Skip to content

Simplify building procedures. #15

Simplify building procedures.

Simplify building procedures. #15

name: Build on Windows
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- name: Build
shell: pwsh
run: |
Install-Module -Name PSComputerManagementZp -Force
Import-Module PSComputerManagementZp
choco install fontforge --yes --limitoutput --force
Add-PathToCurrentProcessEnvPath -Path "C:\Program Files (x86)\FontForgeBuilds\bin"
pip install gftools fonttools[woff]
$hash = Get-FileHash -Path ./Output/JetBrainsMonoNerdFont-Regular.ttf -Algorithm MD5
. ".\build.ps1"
$newHash = Get-FileHash -Path ./Output/JetBrainsMonoNerdFont-Regular.ttf -Algorithm MD5
if ($hash.Hash -eq $newHash.Hash) {
Write-Host "MD5 hash of font file unchanged, no changes detected."
Write-Host "The MD5 is $($hash.Hash)"
}else{
Write-Host "MD5 hash of font file changed, pushing to repository..."
Write-Host "The old MD5 is $($hash.Hash)"
Write-Host "The new MD5 is $($newHash.Hash)"
}