Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on: push

defaults:
run:
shell: bash

jobs:
Build:
strategy:
matrix:
os: [windows-latest, ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: build dnssd
run: |
cd cmd/dnssd
mkdir bin
go build -o bin .
mv bin/dnssd bin/dnssd-${{ runner.os }}-${{ runner.arch }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dnssd-${{ runner.os }}-${{ runner.arch }}
path: cmd/dnssd/bin/dnssd*

Upload:
runs-on: ubuntu-latest
needs:
- Build
if: ${{ github.ref_type == 'tag' }}
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: artifact
pattern: dnssd-*
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
with:
files: artifact/dnssd-*