feat(ci): use nix to build extension zip

This commit is contained in:
Ashhhleyyy 2024-02-25 13:58:26 +00:00
parent f8f2856683
commit 9400db5a9c
Signed by: ash
GPG key ID: 83B789081A0878FB
2 changed files with 14 additions and 2 deletions

View file

@ -15,9 +15,9 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build extension - name: Build extension
run: ./build-ext.sh run: nix build .#extension
- name: Upload extension - name: Upload extension
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: aci-ext.zip name: aci-ext.zip
path: aci-ext.zip path: result

View file

@ -39,6 +39,18 @@
WorkingDir = "/state"; WorkingDir = "/state";
}; };
}; };
extension = pkgs.stdenv.mkDerivation {
name = "aci-extension.zip";
inherit version;
src = ./extension;
phases = "installPhase";
nativeBuildInputs = [ pkgs.zip ];
installPhase = ''
cd $src/
zip -r $out *
'';
};
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [