From 20572fd820f8c85f489b32d5851234170de4329b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 13 Dec 2023 09:13:41 +0100 Subject: [PATCH 1/2] chore(ci): run Nix checks instead of build on CI --- .github/workflows/nix-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 88f4306..3a8e3d0 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -19,4 +19,4 @@ jobs: with: diagnostic-endpoint: "" - name: Run `nix build` - run: nix build -L . + run: nix flake check -L From ae245868633d0d97b26837819251567d8ef36131 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 13 Dec 2023 09:14:16 +0100 Subject: [PATCH 2/2] feat(ci): generate Nix bundle archives on tagged releases --- .github/workflows/nix-build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 3a8e3d0..6dfde83 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -20,3 +20,23 @@ jobs: diagnostic-endpoint: "" - name: Run `nix build` run: nix flake check -L + nix-bundle: + runs-on: ubuntu-latest + # Only run on "v*" tagged commits + if: startsWith(github.event.ref, 'refs/tags/v') + needs: [nix-build] + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v24 + - uses: DeterminateSystems/magic-nix-cache-action@v2 + with: + diagnostic-endpoint: "" + - name: Run `nix bundle` + run: | + nix bundle --out-link wetest-bundle-link + cp --dereference wetest-bundle-link wetest-bundle + - name: 'Upload bundle' + uses: actions/upload-artifact@v3 + with: + name: wetest-bundle + path: wetest-bundle