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 binaries docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace cr.jdbnet.co.uk/jdbnet/wails-builder:latest bash -c " # Install frontend dependencies cd frontend && npm install && cd .. # 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 -nsis cp build/bin/GoExplore-amd64-installer.exe dist/goexplore-windows-installer.exe " - 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-installer.exe s3://apps/goexplore/goexplore-windows-installer.exe --endpoint-url "$R2_ENDPOINT" - name: Clean up run: sudo rm -rf dist build/bin/*