Skip to content

Initial Version

Initial Version #6

name: Build on Linux
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-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: |
sudo apt install fontforge
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)"
}
- name: Setup ossutil
uses: manyuanrong/[email protected]
with:
endpoint: ${{ secrets.EndPoint }}
access-key-id: ${{ secrets.ACCESS_KEY_ID }}
access-key-secret: ${{ secrets.ACCESS_KEY_SECRET }}
sts-token:
- name: Upload to OSS
env:
OSS_Bucket: ${{ secrets.Bucket }}
shell: pwsh
run: |
ossutil cp -rf ./Output/JetBrainsMonoNerdFont-Regular.ttf oss://$Env:OSS_Bucket/JetBrainsMonoNerdFont-Regular.ttf