diff --git a/.envrc b/.envrc index 1d953f4..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use nix +use flake diff --git a/commitlint.config.js b/commitlint.config.js index db74d15..29519fc 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,3 +1,6 @@ module.exports = { extends: ["@commitlint/config-conventional"], + rules: { + "body-max-line-length": [0], + }, }; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4c57fd5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1638806821, + "narHash": "sha256-v2qd2Bsmzft53s43eCbN+4ocrLksRdFLyF/MAGuWuDA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bc5d68306b40b8522ffb69ba6cff91898c2fbbff", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d6a1166 --- /dev/null +++ b/flake.nix @@ -0,0 +1,17 @@ +{ + description = "A .NET core library for building tools"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + buildInputs = [ pkgs.dotnet-sdk_5 pkgs.nodejs-16_x pkgs.nixfmt ]; + }; + }); +} diff --git a/release.config.js b/release.config.js index 0633f9a..b217e78 100644 --- a/release.config.js +++ b/release.config.js @@ -1,4 +1,5 @@ module.exports = { + extends: ["@commitlint/config-conventional"], branches: ["main"], message: "chore(release): v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}", plugins: [ @@ -10,7 +11,12 @@ module.exports = { ], "@semantic-release/release-notes-generator", "@semantic-release/npm", - "semantic-release-dotnet", + [ + "semantic-release-dotnet", + { + paths: ["src/Directory.Build.props"], + }, + ], [ "semantic-release-nuget", { diff --git a/shell.nix b/shell.nix deleted file mode 100644 index d6cdd9f..0000000 --- a/shell.nix +++ /dev/null @@ -1,17 +0,0 @@ -let - sources = import ./nix/sources.nix; - pkgs = import sources.nixpkgs {}; -in -pkgs.mkShell { - buildInputs = [ - pkgs.git - pkgs.nodejs-16_x - pkgs.yarn - pkgs.dotnet-sdk_5 - pkgs.niv - ]; - - shellHooks = '' - export DOTNET_CLI_TELEMETRY_OPTOUT=true - ''; -}