Skip to content

Go-build

Go-build #49

Workflow file for this run

# 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-build
on:
workflow_dispatch:
release:
types: [created]
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux]
goarch: ["386", amd64, arm64, mips, mipsle]
steps:
- uses: actions/checkout@v3
- name: Cloning repo
run: |
rm -rf ./{,.[!.],..?}*
git clone https://github.com/cloudflare/cloudflared .
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goamd64: v1
release_tag: latest
build_flags: "-a"
project_path: "./cmd/cloudflared"
binary_name: "cloudflared"
ldflags: "-w -s"
executable_compression: "upx --ultra-brute"
overwrite: true
release_name: "Release"
asset_name: cloudflared-latest-${{ matrix.goos }}-${{ matrix.goarch }}