name: Build (artifact) on: workflow_dispatch: push: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: https://github.com/actions/checkout@v4 - name: Setup Go uses: https://github.com/actions/setup-go@v5 with: go-version: "1.25" - name: Install protoc run: | sudo apt-get update sudo apt-get install -y protobuf-compiler - name: Install Go protobuf plugins run: | go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: Read VERSION from Makefile shell: bash run: | VERSION="$(awk -F':=' '/^VERSION[[:space:]]*:=/ {gsub(/[[:space:]]/,"",$2); print $2; exit}' Makefile)" if [ -z "$VERSION" ]; then echo "Failed to read VERSION from Makefile" >&2 exit 1 fi echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Build run: make build - name: Upload artifact uses: https://github.com/actions/upload-artifact@v4 with: name: certman-${{ env.VERSION }}-amd64 path: certman-${{ env.VERSION }}-amd64 if-no-files-found: error