fix(proxy): set max_output_bytes for curl subprocess downloads #11
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-linux-gnu | |
| arch: x86_64-linux | |
| - os: ubuntu-latest | |
| target: aarch64-linux-gnu | |
| arch: aarch64-linux | |
| - os: macos-latest | |
| target: aarch64-macos | |
| arch: aarch64-macos | |
| - os: macos-latest | |
| target: x86_64-macos | |
| arch: x86_64-macos | |
| - os: windows-latest | |
| target: x86_64-windows-gnu | |
| arch: x86_64-windows | |
| - os: windows-latest | |
| target: aarch64-windows-gnu | |
| arch: aarch64-windows | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Configure Git line endings | |
| run: | | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| shell: bash | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: '0.15.2' | |
| - name: Build | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.target }} -Dversion="$VERSION" | |
| shell: bash | |
| - name: Package versioned (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| mkdir -p zvm-${{ github.ref_name }}-${{ matrix.arch }} | |
| cp zig-out/bin/zvm zvm-${{ github.ref_name }}-${{ matrix.arch }}/ | |
| cp README.md LICENSE zvm-${{ github.ref_name }}-${{ matrix.arch }}/ 2>/dev/null || true | |
| tar czvf zvm-${{ github.ref_name }}-${{ matrix.arch }}.tar.gz zvm-${{ github.ref_name }}-${{ matrix.arch }} | |
| shell: bash | |
| - name: Package versioned (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| New-Item -ItemType Directory -Force -Path "zvm-${{ github.ref_name }}-${{ matrix.arch }}" | |
| Copy-Item zig-out/bin/zvm.exe "zvm-${{ github.ref_name }}-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Copy-Item README.md "zvm-${{ github.ref_name }}-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Copy-Item LICENSE "zvm-${{ github.ref_name }}-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Compress-Archive -Path "zvm-${{ github.ref_name }}-${{ matrix.arch }}" -DestinationPath "zvm-${{ github.ref_name }}-${{ matrix.arch }}.zip" -Force | |
| shell: pwsh | |
| - name: Package latest (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| mkdir -p zvm-${{ matrix.arch }} | |
| cp zig-out/bin/zvm zvm-${{ matrix.arch }}/ | |
| cp README.md LICENSE zvm-${{ matrix.arch }}/ 2>/dev/null || true | |
| tar czvf zvm-${{ matrix.arch }}.tar.gz zvm-${{ matrix.arch }} | |
| shell: bash | |
| - name: Package latest (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| New-Item -ItemType Directory -Force -Path "zvm-${{ matrix.arch }}" | |
| Copy-Item zig-out/bin/zvm.exe "zvm-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Copy-Item README.md "zvm-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Copy-Item LICENSE "zvm-${{ matrix.arch }}/" -ErrorAction SilentlyContinue | |
| Compress-Archive -Path "zvm-${{ matrix.arch }}" -DestinationPath "zvm-${{ matrix.arch }}.zip" -Force | |
| shell: pwsh | |
| - name: Upload versioned artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: zvm-versioned-${{ matrix.arch }} | |
| path: | | |
| zvm-${{ github.ref_name }}-*.tar.gz | |
| zvm-${{ github.ref_name }}-*.zip | |
| retention-days: 7 | |
| - name: Upload latest artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: zvm-latest-${{ matrix.arch }} | |
| path: | | |
| zvm-x86_64-*.tar.gz | |
| zvm-x86_64-*.zip | |
| zvm-aarch64-*.tar.gz | |
| zvm-aarch64-*.zip | |
| retention-days: 7 | |
| create-release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Download versioned artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: artifacts/version | |
| merge-multiple: true | |
| pattern: zvm-versioned-* | |
| - name: Download latest artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: artifacts/latest | |
| merge-multiple: true | |
| pattern: zvm-latest-* | |
| - name: List artifacts | |
| run: | | |
| echo "=== Versioned ===" && ls -la artifacts/version/ | |
| echo "=== Latest ===" && ls -la artifacts/latest/ | |
| - name: Create Versioned Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Release ${{ github.ref_name }} | |
| tag_name: ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| artifacts/version/zvm-${{ github.ref_name }}-*.tar.gz | |
| artifacts/version/zvm-${{ github.ref_name }}-*.zip | |
| generate_release_notes: true | |
| body: | | |
| ## ZVM ${{ github.ref_name }} | |
| A fast, dependency-free Zig version manager. | |
| ### One-line Install | |
| ```bash | |
| # macOS (Apple Silicon) | |
| curl -L https://github.com/lispking/zvm/releases/latest/download/zvm-aarch64-macos.tar.gz | tar xz | |
| # macOS (Intel) | |
| curl -L https://github.com/lispking/zvm/releases/latest/download/zvm-x86_64-macos.tar.gz | tar xz | |
| # Linux (x86_64) | |
| curl -L https://github.com/lispking/zvm/releases/latest/download/zvm-x86_64-linux.tar.gz | tar xz | |
| ``` | |
| ```bash | |
| sudo mv zvm-*/zvm /usr/local/bin/ | |
| export PATH="$HOME/.zvm/bin:$PATH" | |
| ``` | |
| ### Available Builds | |
| | Platform | Architecture | Stable URL | | |
| |----------|--------------|------------| | |
| | Linux | x86_64 | `zvm-x86_64-linux.tar.gz` | | |
| | Linux | ARM64 | `zvm-aarch64-linux.tar.gz` | | |
| | macOS | Intel | `zvm-x86_64-macos.tar.gz` | | |
| | macOS | Apple Silicon | `zvm-aarch64-macos.tar.gz` | | |
| | Windows | x86_64 | `zvm-x86_64-windows.zip` | | |
| | Windows | ARM64 | `zvm-aarch64-windows.zip` | | |
| All available at `https://github.com/lispking/zvm/releases/latest/download/<file>` | |
| ### Quick Start | |
| ```bash | |
| zvm install master | |
| zvm use master | |
| zig version | |
| ``` | |
| - name: Update Latest Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release delete latest --yes 2>/dev/null || true | |
| sleep 2 | |
| gh release create latest \ | |
| --title "Latest" \ | |
| --notes "Latest stable release (${{ github.ref_name }})." \ | |
| --target ${{ github.sha }} \ | |
| artifacts/latest/zvm-*.tar.gz artifacts/latest/zvm-*.zip |