diff --git a/.gitea/workflows/main.yaml b/.gitea/workflows/main.yaml index bc394d2..8a6f9e3 100644 --- a/.gitea/workflows/main.yaml +++ b/.gitea/workflows/main.yaml @@ -52,6 +52,16 @@ jobs: # environment: production # sourcemaps: ./build/app/ + - name: Upload CLI to R2 + uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.R2_ACCESS_ID }} + aws_secret_access_key: ${{ secrets.R2_ACCESS_SECRET }} + aws_bucket: ${{ secrets.R2_BUCKET }} + endpoint: ${{ secrets.R2_URL }} + source_dir: "build/cli" + destination_dir: "cli" + - name: Set docker chmod (temp solution) run: sudo chmod 666 /var/run/docker.sock diff --git a/apps/cli/package.json b/apps/cli/package.json index d0e3640..83d447a 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -2,6 +2,13 @@ "name": "@boring.tools/cli", "module": "src/index.ts", "type": "module", + "scripts": { + "build:linux": "bun build --compile --target=bun-linux-x64-modern ./src/index.ts --outfile ../../build/cli/linux/bt", + "build:mac:arm": "bun build --compile --target=bun-darwin-arm64 ./src/index.ts --outfile ../../build/cli/mac-arm/bt", + "build:mac:intel": "bun build --compile --target=bun-darwin-x64 ./src/index.ts --outfile ../../build/cli/mac-intel/bt", + "build:win": "bun build --compile --target=bun-windows-x64-modern ./src/index.ts --outfile ../../build/cli/windows/bt", + "build": "bun run build:linux && bun run build:mac:arm && bun run build:mac:intel && bun run build:win" + }, "devDependencies": { "@types/bun": "latest" },