Release #2
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: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| image: debian:stable | |
| cc: cc | |
| suffix: linux-amd64 | |
| - arch: arm64 | |
| image: debian:stable | |
| cc: cc | |
| suffix: linux-arm64 | |
| - arch: amd64 | |
| image: alpine:latest | |
| cc: cc | |
| suffix: linux-amd64-musl | |
| name: ${{ matrix.suffix }} | |
| runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} | |
| container: | |
| image: ${{ matrix.image }} | |
| steps: | |
| - name: Install tools (apt) | |
| if: contains(matrix.image, 'debian') | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential git file curl | |
| curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | |
| -o /usr/share/keyrings/githubcli-archive-keyring.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ | |
| > /etc/apt/sources.list.d/github-cli.list | |
| apt-get update | |
| apt-get install -y gh | |
| - name: Install tools (apk) | |
| if: contains(matrix.image, 'alpine') | |
| run: apk add build-base git file github-cli | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| make CC="${{ matrix.cc }}" CFLAGS="-O2 -pipe -Wall -Wextra -Werror -pedantic -std=c99 -static" LDFLAGS="-static" | |
| file thinproxy | |
| ./thinproxy -V | |
| - name: Package | |
| run: | | |
| tar czf thinproxy-${{ github.ref_name }}-${{ matrix.suffix }}.tar.gz \ | |
| thinproxy thinproxy.8 thinproxy.conf.example thinproxy.service \ | |
| LICENSE README.md | |
| - name: Upload asset | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload "${{ github.ref_name }}" \ | |
| thinproxy-${{ github.ref_name }}-${{ matrix.suffix }}.tar.gz \ | |
| --repo "${{ github.repository }}" \ | |
| --clobber | |
| build-macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| suffix: macos-arm64 | |
| - os: macos-26 | |
| suffix: macos-arm64-26 | |
| name: ${{ matrix.suffix }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| run: | | |
| make | |
| file thinproxy | |
| ./thinproxy -V | |
| - name: Package | |
| run: | | |
| tar czf thinproxy-${{ github.ref_name }}-${{ matrix.suffix }}.tar.gz \ | |
| thinproxy thinproxy.8 thinproxy.conf.example \ | |
| LICENSE README.md | |
| - name: Upload asset | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload "${{ github.ref_name }}" \ | |
| thinproxy-${{ github.ref_name }}-${{ matrix.suffix }}.tar.gz \ | |
| --repo "${{ github.repository }}" \ | |
| --clobber |