Skip to content

Commit 8f8847f

Browse files
committed
ci: build and push to cachix on merge
1 parent b1bb5e2 commit 8f8847f

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed
File renamed without changes.

.github/workflows/nix-build.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: "Nix build"
3+
on:
4+
push:
5+
branches: [ main ]
6+
jobs:
7+
build:
8+
name: ${{ matrix.job.target }}
9+
runs-on: ${{ matrix.job.os }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
job:
14+
- { os: ubuntu-24.04, target: x86_64-linux }
15+
- { os: macos-13, target: x86_64-darwin }
16+
- { os: macos-14, target: aarch64-darwin }
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: DeterminateSystems/nix-installer-action@main
20+
- uses: cachix/cachix-action@v15
21+
with:
22+
name: neorocks
23+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
24+
- name: Build package
25+
run: nix build ".#packages.${{matrix.job.target}}.default" -Lv --accept-flake-config
26+
shell: bash
27+
- name: Build devShell
28+
run: nix build ".#devShells.${{matrix.job.target}}.default" -Lv --accept-flake-config
29+
shell: bash

flake.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
};
5454
};
5555
in {
56-
packages.default = pkgs.lua51Packages.toml-edit;
56+
packages.default = pkgs.luajitPackages.toml-edit;
5757

58-
devShells.default = pkgs.lua51Packages.toml-edit.overrideAttrs (oa: {
58+
devShells.default = pkgs.luajitPackages.toml-edit.overrideAttrs (oa: {
5959
name = "toml-edit devShell";
6060

6161
buildInputs =
@@ -80,7 +80,7 @@
8080

8181
checks = {
8282
inherit pre-commit-check;
83-
inherit (pkgs.lua51Packages) toml-edit;
83+
inherit (pkgs.luajitPackages) toml-edit;
8484
inherit (pkgs) rocks-nvim-check;
8585
};
8686
};

0 commit comments

Comments
 (0)