Skip to content

build(deps): bump github.com/google/uuid from 1.3.0 to 1.4.0 (#67) #55

build(deps): bump github.com/google/uuid from 1.3.0 to 1.4.0 (#67)

build(deps): bump github.com/google/uuid from 1.3.0 to 1.4.0 (#67) #55

Workflow file for this run

name: Build
on:
push:
branches:
- master
tags:
- "v*.*.*"
paths-ignore:
- .github/**
pull_request:
paths-ignore:
- .github/**
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target_platforms:
- GOARCH=amd64 GOOS=windows
- GOARCH=amd64 GOOS=darwin
- GOARCH=amd64 GOOS=linux
- GOARCH=arm GOOS=linux
- GOARCH=arm64 GOOS=linux
- GOARCH=mips GOMIPS=softfloat GOOS=linux
- GOARCH=mipsle GOOS=linux
- GOARCH=mips64 GOOS=linux
- GOARCH=mips64le GOOS=linux
env:
GO111MODULE: 'on'
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
check-latest: true
cache: true
- name: Set environment variables
run: >-
for i in ${{ matrix.target_platforms }}; do
echo ${i} >> $GITHUB_ENV
echo CGO_ENABLED=0 >> $GITHUB_ENV
done
- name: Build
run: |
if [ "${{ env.GOOS }}" == "windows" ]; then
export EXECUTABLE_NAME=dnsupdater.exe
else
export EXECUTABLE_NAME=dnsupdater
fi
export ARTIFACT_TARGET_FOLDER=dnsupdater-${GOOS}-${GOARCH}
if [ "${{ env.GOMIPS }}" ]; then
ARTIFACT_TARGET_FOLDER+="-${{ env.GOMIPS }}"
fi
go build -o ./bin/${ARTIFACT_TARGET_FOLDER}/${EXECUTABLE_NAME} ./cmd/dnsupdater/main.go
cp ./configs/config.yaml.template ./bin/${ARTIFACT_TARGET_FOLDER}/config.yaml.template
- name: Archive files
if: startsWith(github.ref, 'refs/tags/')
run: |
export ARTIFACT_TARGET_FOLDER=dnsupdater-${GOOS}-${GOARCH}
if [ "${{ env.GOMIPS }}" ]; then
ARTIFACT_TARGET_FOLDER+="-${{ env.GOMIPS }}"
fi
cd bin
if [ "${{ env.GOOS }}" == "windows" ]; then
zip -r ${ARTIFACT_TARGET_FOLDER}.zip ${ARTIFACT_TARGET_FOLDER}
else
tar cvzf ${ARTIFACT_TARGET_FOLDER}.tar.gz ${ARTIFACT_TARGET_FOLDER}
fi
ls
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./bin/*.zip
./bin/*.tar.gz