Skip to content

Commit

Permalink
feat!: update build process and dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE: We switched from `@bufbuild/connect` to `@connectrpc/connect`, so please update your imports accordingly.
  • Loading branch information
mirkolenz committed Apr 4, 2024
1 parent 1e47294 commit 2bab292
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 413 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v9
- uses: DeterminateSystems/magic-nix-cache-action@v3
- uses: DeterminateSystems/nix-installer-action@v10
- uses: DeterminateSystems/magic-nix-cache-action@v4
- run: nix profile install .#releaseEnv
- uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
semantic_version: ^22
semantic_version: ^23
extra_plugins: |
@semantic-release/git@^10
@semantic-release/changelog@^6
Expand Down
4 changes: 1 addition & 3 deletions release.config.cjs → .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const config = {
module.exports = {
branches: [
{ name: "main" },
{ name: "next" },
Expand Down Expand Up @@ -55,5 +55,3 @@ const config = {
],
],
};

module.exports = config;
4 changes: 2 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: v1
managed:
enabled: true
plugins:
- name: es
- plugin: buf.build/bufbuild/es:v1.8.0
out: gen
opt: target=js+dts
- name: connect-es
- plugin: buf.build/connectrpc/es:v1.4.0
out: gen
opt: target=js+dts
35 changes: 9 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 26 additions & 37 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,36 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
flake-parts.url = "github:hercules-ci/flake-parts";
npmlock2nix = {
url = "github:nix-community/npmlock2nix";
flake = false;
};
};
outputs = inputs @ {
nixpkgs,
flake-parts,
systems,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
outputs =
inputs@{
nixpkgs,
flake-parts,
systems,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import systems;
perSystem = {
pkgs,
lib,
...
}: let
npmlock2nix = import inputs.npmlock2nix {inherit pkgs;};
in {
packages = {
releaseEnv = pkgs.buildEnv {
name = "release-env";
paths = with pkgs; [nodejs];
perSystem =
{ pkgs, lib, ... }:
{
packages = {
releaseEnv = pkgs.buildEnv {
name = "release-env";
paths = with pkgs; [ nodejs ];
};
bufGenerate = pkgs.writeShellApplication {
name = "buf-generate";
text = ''
${lib.getExe pkgs.buf} mod update
${lib.getExe pkgs.buf} generate --include-imports buf.build/recap/arg-services
'';
};
};
bufGenerate = pkgs.writeShellApplication {
name = "buf-generate";
text = ''
export PATH="${lib.getBin npmlock2nix.v2.node_modules {
src = ./.;
nodejs = pkgs.nodejs;
}}/bin:$PATH"
${lib.getExe pkgs.buf} mod update
${lib.getExe pkgs.buf} generate --include-imports buf.build/recap/arg-services
'';
devShells.default = pkgs.mkShell {
shellHook = "npm install";
packages = with pkgs; [ nodejs ];
};
};
devShells.default = pkgs.mkShell {
shellHook = "npm install";
packages = with pkgs; [nodejs];
};
};
};
}
Loading

0 comments on commit 2bab292

Please sign in to comment.