Skip to content

fix formatting

fix formatting #76

Workflow file for this run

name: Build
'on':
'push':
'tags':
- 'v*'
'branches':
- '*'
'pull_request':
jobs:
tests:
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.x
- name: Run tests
run: |-
go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
if: "success() && matrix.os == 'ubuntu-latest'"
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
build:
strategy:
fail-fast: false
matrix:
include:
- GOOS: windows
GOARCH: 386
- GOOS: windows
GOARCH: amd64
- GOOS: darwin
GOARCH: amd64
- GOOS: darwin
GOARCH: arm64
- GOOS: linux
GOARCH: 386
- GOOS: linux
GOARCH: amd64
- GOOS: linux
GOARCH: arm
GOARM: 6
- GOOS: linux
GOARCH: arm64
- GOOS: linux
GOARCH: mips
GOMIPS: softfloat
- GOOS: linux
GOARCH: mipsle
GOMIPS: softfloat
- GOOS: freebsd
GOARCH: 386
- GOOS: freebsd
GOARCH: amd64
- GOOS: freebsd
GOARCH: arm
GOARM: 6
- GOOS: freebsd
GOARCH: arm64
needs:
- tests
runs-on: ubuntu-latest
env:
GO111MODULE: "on"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.x
- name: Prepare environment
run: |-
RELEASE_VERSION="${GITHUB_REF##*/}"
if [[ "${RELEASE_VERSION}" != v* ]]; then RELEASE_VERSION='dev'; fi
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
- run: GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }} GOARM=${{ matrix.GOARM }} GOMIPS=${{ matrix.GOMIPS }} VERSION=${{ env.RELEASE_VERSION }} make release
- run: ls -l build/dnslookup-*
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/[email protected]
with:
release_name: Release ${{ env.RELEASE_VERSION }}
tag: ${{ github.ref }}
file: build/dnslookup-*
file_glob: true
overwrite: true