From fe1945ff1672c41f39a972e6f66d702bf006e6f6 Mon Sep 17 00:00:00 2001 From: Ashhhleyyy Date: Fri, 5 Jul 2024 16:56:18 +0100 Subject: [PATCH] Revert "chore(ci): cleanup uneeded build steps" This reverts commit db3d33b15632287f8a5dd8367fdf8fdbbede730a. --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 603c3f0..66196ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Install cross + uses: actions-rs/cargo@v1 + with: + command: install + args: --force cross + - name: Login to GHCR uses: docker/login-action@v1 with: @@ -61,5 +67,26 @@ jobs: - name: Display asset index run: cat assetindex.json + - name: Build with cargo + uses: actions-rs/cargo@v1 + with: + command: build + args: --release + + - name: Build with cross (aarch64-unknown-linux-musl) + run: cross build --release --target aarch64-unknown-linux-musl + + - name: Upload artifacts (x64) + uses: actions/upload-artifact@v2 + with: + name: website-x64 + path: target/release/website + + - name: Upload artifacts (arm64) + uses: actions/upload-artifact@v2 + with: + name: website-arm64 + path: target/aarch64-unknown-linux-musl/release/website + - name: Build container image run: docker buildx build -t ghcr.io/ashhhleyyy/website:latest -t ghcr.io/ashhhleyyy/website:${GITHUB_SHA} --platform linux/arm64 --push .