test build 1.6.54 #6
Workflow file for this run
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: Build WindUI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - test-build | |
| paths-ignore: | |
| - 'README.md' | |
| - 'changelog.md' | |
| - 'dist/**' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: "!contains(github.event.head_commit.message, 'Build: auto-update')" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: npm-${{ hashFiles('package-lock.json') }} | |
| restore-keys: npm- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Setup Rust (for Darklua) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: cargo-${{ runner.os }}- | |
| - name: Install Darklua | |
| run: cargo install darklua || echo "Darklua already installed" | |
| - name: Setup Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lua5.4 | |
| - name: Build project | |
| run: npm run build | |
| - name: Commit build output | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git pull origin main --rebase | |
| git add dist/main.lua | |
| git diff --cached --quiet && echo "No changes to commit" || git commit -m "Build: auto-update dist/main.lua" | |
| git push |