# Builds and publishes oohelperd for Linux name: oohelperd on: push: branches: - "release/**" - "fullbuild" tags: - "v*" schedule: - cron: "17 1 * * *" jobs: build_and_publish: runs-on: "ubuntu-20.04" permissions: # See https://github.com/ooni/probe/issues/2154 contents: write steps: - uses: actions/checkout@v2 - name: Get GOVERSION content id: goversion run: echo ::set-output name=version::$(cat GOVERSION) - uses: magnetikonline/action-golang-cache@v2 with: go-version: "${{ steps.goversion.outputs.version }}" cache-key-suffix: "-oohelperd-${{ steps.goversion.outputs.version }}" - name: build oohelperd binary run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./CLI/oohelperd-linux-amd64 -v -tags netgo -ldflags="-s -w -extldflags -static" ./internal/cmd/oohelperd - run: ./script/ghpublish.bash ./CLI/oohelperd-linux-amd64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}