ci: add Gitea workflow for cross-platform binary builds and update output filename configuration
Build and Upload Binaries / build-and-upload (push) Failing after 17m33s
Build and Upload Binaries / build-and-upload (push) Failing after 17m33s
This commit is contained in:
@@ -0,0 +1,80 @@
|
|||||||
|
name: Build and Upload Binaries
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-upload:
|
||||||
|
runs-on: build-htz-01
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Build Windows and Linux AMD64 binaries
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
|
||||||
|
# Build Linux amd64 and Windows (amd64 & arm64) binaries
|
||||||
|
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace golang:1.26.4-bookworm bash -c "
|
||||||
|
apt-get update && apt-get install -y curl gcc mingw-w64 libgtk-3-dev libwebkit2gtk-4.1-dev
|
||||||
|
|
||||||
|
# Install Node.js
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Install Wails CLI
|
||||||
|
go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||||
|
export PATH=\"\$PATH:\$(go env GOPATH)/bin\"
|
||||||
|
|
||||||
|
# Linux amd64
|
||||||
|
wails build -platform linux/amd64 -tags webkit2_41 -clean
|
||||||
|
cp build/bin/goexplore dist/goexplore-linux-amd64
|
||||||
|
|
||||||
|
# Windows amd64
|
||||||
|
wails build -platform windows/amd64 -clean
|
||||||
|
cp build/bin/goexplore.exe dist/goexplore-windows-amd64.exe
|
||||||
|
|
||||||
|
# Windows arm64
|
||||||
|
wails build -platform windows/arm64 -clean
|
||||||
|
cp build/bin/goexplore.exe dist/goexplore-windows-arm64.exe
|
||||||
|
"
|
||||||
|
|
||||||
|
- name: Build Linux ARM64 binary (via QEMU)
|
||||||
|
run: |
|
||||||
|
# Build Linux arm64 binaries (via QEMU)
|
||||||
|
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/workspace -w /workspace golang:1.26.4-bookworm bash -c "
|
||||||
|
apt-get update && apt-get install -y curl gcc libgtk-3-dev libwebkit2gtk-4.1-dev
|
||||||
|
|
||||||
|
# Install Node.js
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Install Wails CLI
|
||||||
|
go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||||
|
export PATH=\"\$PATH:\$(go env GOPATH)/bin\"
|
||||||
|
|
||||||
|
# Linux arm64
|
||||||
|
wails build -platform linux/arm64 -tags webkit2_41 -clean
|
||||||
|
cp build/bin/goexplore dist/goexplore-linux-arm64
|
||||||
|
"
|
||||||
|
|
||||||
|
- name: Upload to Cloudflare R2
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
|
AWS_DEFAULT_REGION: auto
|
||||||
|
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT_URL }}
|
||||||
|
run: |
|
||||||
|
aws s3 cp dist/goexplore-linux-amd64 s3://apps/goexplore/goexplore-linux-amd64 --endpoint-url "$R2_ENDPOINT"
|
||||||
|
aws s3 cp dist/goexplore-windows-amd64.exe s3://apps/goexplore/goexplore-windows-amd64.exe --endpoint-url "$R2_ENDPOINT"
|
||||||
|
aws s3 cp dist/goexplore-windows-arm64.exe s3://apps/goexplore/goexplore-windows-arm64.exe --endpoint-url "$R2_ENDPOINT"
|
||||||
|
aws s3 cp dist/goexplore-linux-arm64 s3://apps/goexplore/goexplore-linux-arm64 --endpoint-url "$R2_ENDPOINT"
|
||||||
|
|
||||||
|
- name: Clean up
|
||||||
|
run: sudo rm -rf dist build/bin/*
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://wails.io/schemas/config.v2.json",
|
"$schema": "https://wails.io/schemas/config.v2.json",
|
||||||
"name": "goexplore",
|
"name": "goexplore",
|
||||||
"outputfilename": "goexplore-init",
|
"outputfilename": "goexplore",
|
||||||
"frontend:install": "npm install",
|
"frontend:install": "npm install",
|
||||||
"frontend:build": "npm run build",
|
"frontend:build": "npm run build",
|
||||||
"frontend:dev:watcher": "npm run dev",
|
"frontend:dev:watcher": "npm run dev",
|
||||||
@@ -10,4 +10,4 @@
|
|||||||
"name": "Jamie Banks",
|
"name": "Jamie Banks",
|
||||||
"email": "jamie@jdbnet.co.uk"
|
"email": "jamie@jdbnet.co.uk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user