diff --git a/.github/workflows/test_typst_out_action.yml b/.github/workflows/test_typst_out_action.yml index a2b7e480..662bf0e8 100644 --- a/.github/workflows/test_typst_out_action.yml +++ b/.github/workflows/test_typst_out_action.yml @@ -7,6 +7,22 @@ on: pull_request: branches: - main + workflow_dispatch: + inputs: + os: + description: 'Operating System(s) to test on' + required: false + type: choice + default: 'all' + options: + - 'all' + - 'ubuntu-latest' + - 'macos-latest' + - 'windows-latest' + typst_version: + description: 'Typst version to test (leave empty for all versions)' + required: false + type: string permissions: contents: read @@ -52,6 +68,28 @@ jobs: # Parse the TYPST_VERSIONS array ALL_VERSIONS='${{ env.TYPST_VERSIONS }}' + # Handle manual workflow_dispatch + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "Manual workflow dispatch detected" + + # Handle OS selection + if [ "${{ github.event.inputs.os }}" == "all" ]; then + echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT + else + echo 'os-matrix=["${{ github.event.inputs.os }}"]' >> $GITHUB_OUTPUT + fi + + # Handle typst version selection + if [ -n "${{ github.event.inputs.typst_version }}" ]; then + echo 'typst-version-matrix=["${{ github.event.inputs.typst_version }}"]' >> $GITHUB_OUTPUT + else + # Use all versions from TYPST_VERSIONS + echo "typst-version-matrix=$ALL_VERSIONS" >> $GITHUB_OUTPUT + fi + + exit 0 + fi + if [ "${{ steps.filter.outputs.workflow }}" == "true" ]; then # Check if this is a PR or push event if [ "${{ github.event_name }}" == "pull_request" ]; then @@ -142,8 +180,8 @@ jobs: fonts-texgyre \ fonts-cascadia-code elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then - # Install Not Sans CJK fonts - brew install --cask font-noto-sans-cjk + # Install Noto Sans CJK fonts (individual language-specific packages) + brew install --cask font-noto-sans-cjk-tc font-noto-sans-cjk-jp font-noto-sans-cjk-kr # Install other fonts may be used in the template echo "Installing TeX Gyre fonts..." brew search font-tex-gyre | grep '^font-tex-gyre' | xargs -I{} brew install --cask {}