cloudflared-mirror/.github/workflows/main.yaml

49 lines
1.3 KiB
YAML

name: Build & Upload Artifacts
on:
push:
tags:
- '*'
jobs:
build-container-and-deploy:
runs-on: ubuntu-latest
name: Build cloudflared for FreeBSD
if: github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
shell: bash
run: |
# Install cloudflare-go
./.teamcity/install-cloudflare-go.sh
# Disable FIPS module in go-boring
export GOEXPERIMENT=noboringcrypto
export CGO_ENABLED=0
freebsdArchs=("386" "amd64" "arm" "arm64")
export TARGET_OS=freebsd
echo "#### SHA256 Checksums:" > /tmp/release.txt
for arch in ${freebsdArchs[@]}; do
export TARGET_ARCH=$arch
echo "Building cloudflared-freebsd-$arch"
make cloudflared
mv ./cloudflared /tmp/cloudflared-freebsd-$arch
echo " cloudflared-freebsd-$arch: $(sha256sum /tmp/cloudflared-freebsd-$arch | cut -d ' ' -f 1)" > /tmp/release.txt
done
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: /tmp/release.txt
files: |
/tmp/cloudflared-freebsd-386
/tmp/cloudflared-freebsd-amd64
/tmp/cloudflared-freebsd-arm
/tmp/cloudflared-freebsd-arm64