Skip to content

fix(wgmodule): add golang.org/x/mobile dependency required by gomobil… #15

fix(wgmodule): add golang.org/x/mobile dependency required by gomobil…

fix(wgmodule): add golang.org/x/mobile dependency required by gomobil… #15

Workflow file for this run

name: Build & Publish CLI Binaries
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
binary: ipv6diag-linux-amd64
- goos: linux
goarch: arm64
binary: ipv6diag-linux-arm64
- goos: darwin
goarch: amd64
binary: ipv6diag-darwin-amd64
- goos: darwin
goarch: arm64
binary: ipv6diag-darwin-arm64
- goos: windows
goarch: amd64
binary: ipv6diag-windows-amd64.exe
- goos: windows
goarch: arm64
binary: ipv6diag-windows-arm64.exe
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: cli/go.mod
cache-dependency-path: cli/go.sum
- name: Build
working-directory: cli
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
go build \
-ldflags "-X main.version=${{ github.ref_name }} -s -w" \
-o "${{ matrix.binary }}" \
.
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.binary }}
path: cli/${{ matrix.binary }}
retention-days: 1
release:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: binaries
merge-multiple: true
- name: Publish to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: binaries/*
generate_release_notes: false