From cc2b181437977121a7bc279582c90f21a89e1f4b Mon Sep 17 00:00:00 2001 From: BeiyanYunyi <14120445+BeiyanYunyi@users.noreply.github.com> Date: Wed, 25 Dec 2024 22:52:02 +0800 Subject: [PATCH] ci: :construction_worker: add ci to build --- .github/workflows/build.yaml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..78ac6b0 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,40 @@ +name: Build + +on: + workflow_dispatch: + workflow_call: + push: + +concurrency: + group: build-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: DeterminateSystems/flake-checker-action@main + + - name: Print flake metadata + run: nix flake metadata --accept-flake-config + + - name: Build + run: | + NIXPKGS_ALLOW_UNFREE=1 nix build .# --accept-flake-config + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: result + path: | + result