Skip to content

Build and Release #1070

Build and Release

Build and Release #1070

Workflow file for this run

name: Build and Release
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
outputs:
ver: ${{ steps.getversion.outputs.ver }}
cver: ${{ steps.getversion.outputs.cver }}
steps:
-
name: Get version
id: getversion
run: |
ver=`curl https://api.github.com/repos/cloudflare/cloudflared/releases/latest | jq -r '.tag_name'`
cver=`curl https://api.github.com/repos/minetaro12/cloudflared-mipsle/releases/latest | jq -r '.tag_name'`
echo "ver=${ver}" >> $GITHUB_OUTPUT
echo "cver=${cver}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: check
if: ${{ needs.check.outputs.ver != needs.check.outputs.cver }}
steps:
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.3
-
name: Checkout
uses: actions/checkout@v3
-
name: Build
run: |
git clone https://github.com/cloudflare/cloudflared -b ${{ needs.check.outputs.ver }} ../src
cd ../src
# Build for mipsle
GOOS=linux GOARCH=mipsle GOMIPS=softfloat make cloudflared
mv cloudflared cloudflared-linux-mipsle
# Build for mips
GOOS=linux GOARCH=mips GOMIPS=softfloat make cloudflared
mv cloudflared cloudflared-linux-mips
-
name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.check.outputs.ver }}
files: |
../src/cloudflared-linux-mipsle
../src/cloudflared-linux-mips