Release Launcher #19
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: Release Launcher | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: '0.13.0' | |
| - name: Install zigbuild | |
| run: | | |
| cargo install --locked cargo-zigbuild | |
| - name: Install targets | |
| run: | | |
| rustup target add x86_64-pc-windows-msvc | |
| - name: Build | |
| run: | | |
| cargo build --target x86_64-pc-windows-msvc --release | |
| # Upload artifacts | |
| - name: Upload x86_64-pc-windows-msvc | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: JavaLauncher-x86_64-pc-windows-msvc | |
| if-no-files-found: error | |
| path: | | |
| target/x86_64-pc-windows-msvc/release/JavaLauncher.exe | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: '0.13.0' | |
| - name: Install zigbuild | |
| run: | | |
| cargo install --locked cargo-zigbuild | |
| - name: Install targets | |
| run: | | |
| rustup target add x86_64-apple-darwin | |
| rustup target add aarch64-apple-darwin | |
| - name: Build | |
| run: | | |
| cargo build --target x86_64-apple-darwin --release | |
| cargo build --target aarch64-apple-darwin --release | |
| # Upload artifacts | |
| - name: Upload x86_64-apple-darwin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: JavaLauncher-x86_64-apple-darwin | |
| if-no-files-found: error | |
| path: | | |
| target/x86_64-apple-darwin/release/JavaLauncher | |
| - name: Upload aarch64-apple-darwin | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: JavaLauncher-aarch64-apple-darwin | |
| if-no-files-found: error | |
| path: | | |
| target/aarch64-apple-darwin/release/JavaLauncher | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: '0.13.0' | |
| - name: Install zigbuild | |
| run: | | |
| cargo install --locked cargo-zigbuild | |
| - name: Install targets | |
| run: | | |
| rustup target add x86_64-unknown-linux-gnu | |
| - name: Build | |
| run: | | |
| cargo zigbuild --target x86_64-unknown-linux-gnu --release | |
| # Upload artifacts | |
| - name: Upload x86_64-unknown-linux-gnu | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: JavaLauncher-x86_64-unknown-linux-gnu | |
| if-no-files-found: error | |
| path: | | |
| target/x86_64-unknown-linux-gnu/release/JavaLauncher |