Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { goos: linux, goarch: amd64 }
- { goos: linux, goarch: arm64 }
- { goos: darwin, goarch: amd64 }
- { goos: darwin, goarch: arm64 }
- { goos: windows, goarch: amd64 }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: client/go.mod
cache-dependency-path: |
client/go.sum
server/go.sum
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
ext=""
if [ "${{ matrix.goos }}" = "windows" ]; then ext=".exe"; fi
mkdir -p dist
version="${GITHUB_REF_NAME}"
cd server
go build -trimpath \
-ldflags "-s -w -X main.version=${version}" \
-o "../dist/arena-tunnel-server-${{ matrix.goos }}-${{ matrix.goarch }}${ext}" ./...
cd ../client
go build -trimpath \
-ldflags "-s -w -X main.version=${version}" \
-o "../dist/arena-tunnel-client-${{ matrix.goos }}-${{ matrix.goarch }}${ext}" ./...
- name: Bundle wintun.dll into windows zip
if: matrix.goos == 'windows'
run: |
mkdir -p dist/windows-bundle
cp dist/arena-tunnel-client-windows-amd64.exe dist/windows-bundle/arena-tunnel-client.exe
cp dist/arena-tunnel-server-windows-amd64.exe dist/windows-bundle/arena-tunnel-server.exe
cp assets/wintun-amd64.dll dist/windows-bundle/wintun.dll
cd dist/windows-bundle
zip -r ../arena-tunnel-windows-amd64.zip .
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/
release:
name: GitHub Release
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist-raw
merge-multiple: true
- name: Stage release assets + checksums
run: |
mkdir -p release
# Per-platform binaries
cp dist-raw/arena-tunnel-server-* release/ 2>/dev/null || true
cp dist-raw/arena-tunnel-client-* release/ 2>/dev/null || true
# Windows full zip (already produced by build job)
cp dist-raw/arena-tunnel-windows-amd64.zip release/ 2>/dev/null || true
# Drop the bundle staging dir
rm -rf release/windows-bundle
cd release
sha256sum * > SHA256SUMS
echo "==="
ls -lh
cat SHA256SUMS
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: release/*
generate_release_notes: true
body: |
## arena-tunnel ${{ github.ref_name }}
Single-binary WireGuard-over-WebSocket tunnel. See README + ARCHITECTURE for design.
### Downloads
| Platform | Binary |
|-----------------|-------------------------------------------------------|
| Linux x86_64 | `arena-tunnel-client-linux-amd64` |
| Linux ARM64 | `arena-tunnel-client-linux-arm64` |
| macOS Intel | `arena-tunnel-client-darwin-amd64` |
| macOS Apple Si | `arena-tunnel-client-darwin-arm64` |
| Windows x86_64 | `arena-tunnel-windows-amd64.zip` (includes wintun.dll)|
Verify with `sha256sum -c SHA256SUMS`.