From d034e2b88233c9d5c899fd01a25276cad8fb9926 Mon Sep 17 00:00:00 2001 From: Angel Wang Date: Mon, 22 Jun 2026 20:57:20 -0600 Subject: [PATCH] feat: build on github actions --- .github/workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3cbdaaf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,63 @@ +name: Build + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Setup repo + uses: actions/checkout@v4 + + - name: Setup Deno + uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2 + with: + deno-version: v2.8.x + + - name: Run linter + run: deno lint + + - name: Build apply for x86_64 Linux + run: deno compile --target x86_64-unknown-linux-gnu --output build/rainwall-apply-linux-x86_64 -A ./src/apply/index.ts + + - name: Build apply for aarch64 Linux + run: deno compile --target aarch64-unknown-linux-gnu --output build/rainwall-apply-linux-aarch64 -A ./src/apply/index.ts + + - name: Build apply for x86_64 Darwin + run: deno compile --target x86_64-apple-darwin --output build/rainwall-apply-darwin-x86_64 -A ./src/apply/index.ts + + - name: Build apply for aarch64 darwin + run: deno compile --target aarch64-apple-darwin --output build/rainwall-apply-darwin-aarch64 -A ./src/apply/index.ts + + - name: Build apply for x86_64 Windows + run: deno compile --target x86_64-pc-windows-msvc --output build/rainwall-apply-windows-x86_64 -A ./src/apply/index.ts + + - name: Build analyze for x86_64 Linux + run: deno compile --target x86_64-unknown-linux-gnu --output build/rainwall-analyze-linux-x86_64 -A ./src/analyze/index.ts + + - name: Build analyze for aarch64 Linux + run: deno compile --target aarch64-unknown-linux-gnu --output build/rainwall-analyze-linux-aarch64 -A ./src/analyze/index.ts + + - name: Build analyze for x86_64 Darwin + run: deno compile --target x86_64-apple-darwin --output build/rainwall-analyze-darwin-x86_64 -A ./src/analyze/index.ts + + - name: Build analyze for aarch64 darwin + run: deno compile --target aarch64-apple-darwin --output build/rainwall-analyze-darwin-aarch64 -A ./src/analyze/index.ts + + - name: Build analyze for x86_64 Windows + run: deno compile --target x86_64-pc-windows-msvc --output build/rainwall-analyze-windows-x86_64 -A ./src/analyze/index.ts + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: Artifacts + path: build/ -- 2.54.0