v3.1 #7
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 & Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-release: | |
| runs-on: ubuntu-latest | |
| name: Build and Release for Multiple OS & Arch | |
| permissions: | |
| contents: write | |
| strategy: | |
| matrix: | |
| include: | |
| # Windows targets (64-bit only) | |
| - os: windows | |
| goos: windows | |
| arch: amd64 | |
| suffix: .exe | |
| - os: windows | |
| goos: windows | |
| arch: arm64 | |
| suffix: .exe | |
| # Linux targets (64-bit architectures) | |
| - os: linux | |
| goos: linux | |
| arch: amd64 | |
| suffix: '' | |
| - os: linux | |
| goos: linux | |
| arch: arm64 | |
| suffix: '' | |
| - os: linux | |
| goos: linux | |
| arch: riscv64 | |
| suffix: '' | |
| # macOS targets (64-bit only) - CORRECTED: use "darwin" for GOOS | |
| - os: macos | |
| goos: darwin | |
| arch: amd64 | |
| suffix: '' | |
| - os: macos | |
| goos: darwin | |
| arch: arm64 | |
| suffix: '' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.5' | |
| - name: Build for ${{ matrix.os }} (${{ matrix.arch }}) | |
| run: | | |
| CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.arch }} go build -o webcurl${{ matrix.suffix }} | |
| zip -j webcurl-${{ matrix.os }}-${{ matrix.arch }}.zip webcurl${{ matrix.suffix }} | |
| - name: Create Release and Upload Assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ github.ref_name }} | |
| tag_name: ${{ github.ref_name }} | |
| files: webcurl-*.zip |