Merge pull request #57 from thevurv/lua-api-2-pt2-chapter2 #52
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: Download | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - "**.lua" | |
| - "**.rs" | |
| - "**/Cargo.toml" | |
| - "!**/examples/**.rs" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| - name: Install just | |
| uses: extractions/setup-just@v2 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache target directory | |
| uses: actions/cache@v3 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build with just | |
| run: just build-egui release | |
| - name: Create zip archive (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| cd release | |
| zip -r ../autorun-${{ runner.os }}.zip . | |
| - name: Create zip archive (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| cd release | |
| Compress-Archive -Path * -DestinationPath ../autorun-${{ runner.os }}.zip | |
| - name: Upload release archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Autorun ${{ runner.os }} | |
| path: autorun-${{ runner.os }}.zip | |
| if-no-files-found: error |