Merge pull request #19398 from Nexus-Mods/feat/18921-cleanup-1 #2066
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Main | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| NO_PARALLEL: true | |
| NEXUS_API_KEY: ${{ secrets.NEXUS_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: "recursive" | |
| - name: Print dotnet info | |
| run: dotnet --info | |
| - name: Read Node.js version from package.json | |
| id: node-version | |
| shell: pwsh | |
| run: | | |
| $packageJson = Get-Content package.json | ConvertFrom-Json | |
| $nodeVersion = $packageJson.engines.node | |
| echo "NODE_VERSION=$nodeVersion" >> $env:GITHUB_OUTPUT | |
| echo "Using Node.js version: $nodeVersion" | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ steps.node-version.outputs.NODE_VERSION }} | |
| cache: "yarn" | |
| # NOTE(erri120): fontconfig required by font-scanner required by theme-switcher | |
| - name: Install fontconfig | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --network-timeout 600000 install | |
| - name: Build | |
| run: yarn build | |
| - name: Test | |
| if: runner.os == 'Windows' | |
| run: yarn test | |