Skip to content

.github/workflows/Test.yml #21

.github/workflows/Test.yml

.github/workflows/Test.yml #21

Workflow file for this run

on:
workflow_dispatch:
jobs:
Release:
runs-on: ubuntu-latest
permissions: write-all
name: test-Export
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Release
id: get-release
uses: robinraju/[email protected]
with:
repository: "atelier-anchor/smiley-sans"
latest: true
fileName: "*.zip"
# out-file-path: "Build"
# extract: true
- name: Check workspace
run: |
ls $GITHUB_WORKSPACE/
- name: Make font
run: |
mkdir ./Build/
mkdir ./Build/x1/
mkdir ./Build/x2/
unzip -o ${{ fromJson(steps.get-release.outputs.downloaded_files)[0] }} -d ./Build
grub-mkfont -o ./Build/x1/SmileySans-Oblique_32.pf2 -s 32 -v ./Build/SmileySans-Oblique.ttf
grub-mkfont -o ./Build/x1/SmileySans-Oblique_48.pf2 -s 48 -v ./Build/SmileySans-Oblique.ttf
grub-mkfont -o ./Build/x2/SmileySans-Oblique_64.pf2 -s 64 -v ./Build/SmileySans-Oblique.ttf
grub-mkfont -o ./Build/x2/SmileySans-Oblique_96.pf2 -s 96 -v ./Build/SmileySans-Oblique.ttf
find . -type d -name "568flat*" ! -name "568flat_x*" -exec bash -c 'cp -v -u "./Build/x1/SmileySans-Oblique_32.pf2" "{}/"' \; -exec bash -c 'cp -v -u "./Build/x1/SmileySans-Oblique_48.pf2" "{}/"' \;
find . -type d -name "568flat_x2*" -exec bash -c 'cp -v -u "./Build/x2/SmileySans-Oblique_64.pf2" "{}/"' \; -exec bash -c 'cp -v -u "./Build/x2/SmileySans-Oblique_96.pf2" "{}/"' \;
- name: Place Components
run: |
# 公共
find . -maxdepth 1 -type d -name "568flat*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/ -maxdepth 1 -type f -name "*.png") {}/'
# 分辨率
find . -maxdepth 1 -type d -name "568flat*" ! -name "568flat_x*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x1/ -maxdepth 1 -type f -name "*.png") {}/'
find . -maxdepth 1 -type d -name "568flat_x2*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x2/ -maxdepth 1 -type f -name "*.png") {}/'
# 语言和分辨率
find . -maxdepth 1 -type d -name "568flat*" ! -name "568flat_x*" ! -name "*-en" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x1/zh/ -maxdepth 1 -type f -name "*.png") {}/'
find . -maxdepth 1 -type d -name "568flat*-en" ! -name "568flat_x*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x1/en/ -maxdepth 1 -type f -name "*.png") {}/'
find . -maxdepth 1 -type d ! -name "*-en" -name "568flat_x2*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x2/zh/ -maxdepth 1 -type f -name "*.png") {}/'
find . -maxdepth 1 -type d -name "*-en" -name "568flat_x2*" | xargs -I {} sh -c 'cp -v $(find ./assets/Components/x2/en/ -maxdepth 1 -type f -name "*.png") {}/'
- name: Pack
run: |
mkdir Release
find . -type d -name "568flat*" -exec bash -c 'zip -r "./Release/$(basename {}).zip" "{}"' \;
- name: test-Check
uses: actions/upload-artifact@v4
with:
name: test-Files
path: ./Release/*