Release automation (#80)

* add hercules-ci-effects

* flake.lock: Update

Flake lock file updates:

• Added input 'hercules-ci-effects':
    'github:max-privatevoid/hercules-ci-effects/b8127446a483cfd91495037e343b592662033188?narHash=sha256-xlxgYZ0eCnr9ikQuM5VuD8rUjLdbGzSKgF2EoRKDn/8%3D' (2025-07-01)
• Added input 'hercules-ci-effects/flake-parts':
    follows 'flake-parts'
• Added input 'hercules-ci-effects/nixpkgs':
    follows 'nixpkgs'

* provide binary artifacts via github releases

* auto-tag releases from current package version
This commit is contained in:
Max 2025-07-01 23:45:12 +02:00 committed by GitHub
parent 359adb47fa
commit 71dcc1886e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 63 additions and 5 deletions

View File

@ -2,6 +2,7 @@
imports = [
./generate-schemas.nix
./formatting.nix
./jobs/release.nix
];
perSystem =

22
dev/jobs/release.nix Normal file
View File

@ -0,0 +1,22 @@
{
config,
lib,
withSystem,
...
}:
{
hercules-ci.github-releases = {
condition = { branch, ... }: branch == "master";
releaseTag =
_: "v${withSystem config.defaultEffectSystem ({ config, ... }: config.packages.hyprspace.version)}";
filesPerSystem =
{ config, system, ... }:
[
{
label = "hyprspace-${system}";
path = lib.getExe config.packages.hyprspace;
}
];
};
}

View File

@ -20,6 +20,30 @@
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751406060,
"narHash": "sha256-xlxgYZ0eCnr9ikQuM5VuD8rUjLdbGzSKgF2EoRKDn/8=",
"owner": "max-privatevoid",
"repo": "hercules-ci-effects",
"rev": "b8127446a483cfd91495037e343b592662033188",
"type": "github"
},
"original": {
"owner": "max-privatevoid",
"ref": "pr/skip-if-exists",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1751011381,
@ -39,6 +63,7 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": "nixpkgs"
}
}

View File

@ -7,6 +7,13 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
hercules-ci-effects = {
url = "github:max-privatevoid/hercules-ci-effects/pr/skip-if-exists";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
};
};
};
outputs =
@ -18,13 +25,13 @@
"aarch64-darwin"
"x86_64-darwin"
];
herculesCI.ciSystems = [
"x86_64-linux"
"aarch64-linux"
];
flake =
{ config, ... }:
{
herculesCI.ciSystems = [
"x86_64-linux"
"aarch64-linux"
];
nixosModules = {
default = config.nixosModules.hyprspace;
hyprspace =
@ -36,7 +43,10 @@
};
};
imports = [ ./dev ];
imports = [
inputs.hercules-ci-effects.flakeModule
./dev
];
perSystem =
{ config, pkgs, ... }: