Update ZScript Compiler version to 0.3.6 #5
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 and Release ZScript | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # ---------- LINUX ---------- | |
| - os: ubuntu-latest | |
| name: linux-x64 | |
| target: bun-linux-x64 | |
| # We add a 'variant' field to control output naming | |
| variant: "" | |
| - os: ubuntu-latest | |
| name: linux-x64-musl | |
| target: bun-linux-x64-musl | |
| variant: "-musl" | |
| - os: ubuntu-latest | |
| name: linux-arm64 | |
| target: bun-linux-arm64 | |
| variant: "" | |
| - os: ubuntu-latest | |
| name: linux-arm64-musl | |
| target: bun-linux-arm64-musl | |
| variant: "-musl" | |
| # ---------- WINDOWS (AVX2 and BASELINE VARIANTS ADDED) ---------- | |
| - os: windows-latest | |
| name: windows-x64-avx2 | |
| target: bun-windows-x64 | |
| variant: "-avx2" | |
| - os: windows-latest | |
| name: windows-x64-baseline | |
| target: bun-windows-x64-baseline | |
| variant: "-baseline" | |
| # ---------- MACOS ---------- | |
| - os: macos-latest | |
| name: macos-x64 | |
| target: bun-darwin-x64 | |
| variant: "" | |
| - os: macos-latest | |
| name: macos-arm64 | |
| target: bun-darwin-arm64 | |
| variant: "" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| working-directory: compiler | |
| shell: bash | |
| run: bun install | |
| - name: Build binary | |
| working-directory: compiler | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| # We use a dynamic filename based on the matrix name/variant | |
| # In Windows, bun automatically adds the .exe extension if the target is windows | |
| bun build zsc.js \ | |
| --compile \ | |
| --target=${{ matrix.target }} \ | |
| --outfile dist/zsc${{ matrix.variant }} | |
| # -------- Linux & macOS -------- | |
| - name: Package tar.gz | |
| if: runner.os != 'Windows' | |
| working-directory: compiler/dist | |
| shell: bash | |
| run: | | |
| # Use the dynamic filename created above for packaging | |
| BIN_NAME="zsc${{ matrix.variant }}" | |
| chmod +x $BIN_NAME | |
| tar -czf zsc-${{ matrix.name }}.tar.gz $BIN_NAME | |
| # -------- Windows -------- | |
| - name: Package zip (Windows) | |
| if: runner.os == 'Windows' | |
| working-directory: compiler/dist | |
| shell: pwsh | |
| run: | | |
| # Use the dynamic filename created above (with auto .exe extension) for zipping | |
| $BIN_NAME = "zsc${{ matrix.variant }}.exe" | |
| Compress-Archive $BIN_NAME zsc-${{ matrix.name }}.zip | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: compiler/dist/zsc-${{ matrix.name }}.* |