Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
sed -i "s|buildVersion = null;|buildVersion = \"$VERSION\";|" flake.nix

- name: Build Artifacts
run: nix build --option warn-dirty false --print-build-logs
run: nix build .#release --option warn-dirty false --print-build-logs

- name: Upload Artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
build = import ./nix/build.nix { inherit pkgs self; };
in
{
default = build.release {
default = build.binary { inherit version; };
release = build.release {
inherit
version
goPlatforms
Expand Down
20 changes: 20 additions & 0 deletions nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@ let

in
{
# Host-native CLI binary. This is the default package, so nix build and nix
# run give you a binary for your own machine rather than the full release.
binary =
{ version }:
goBinary {
inherit version;
pname = "crossplane";
subPackage = "cmd/crossplane";
platform = {
os = pkgs.stdenv.hostPlatform.parsed.kernel.name;
# Go and Nix disagree on architecture names.
arch =
{
"x86_64" = "amd64";
"aarch64" = "arm64";
}
.${pkgs.stdenv.hostPlatform.parsed.cpu.name};
};
};

# Full release package with all artifacts.
release =
{
Expand Down
Loading