From 79b47384b235115eb8bce55ebacbbdb59db95fe4 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 27 Jan 2026 10:57:51 -0700 Subject: [PATCH 1/3] nix support --- .envrc | 10 +++++++++ .gitignore | 3 ++- flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 +++++++++++++++++++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..8fec017c --- /dev/null +++ b/.envrc @@ -0,0 +1,10 @@ +use flake + +if [[ -f .env ]]; then + dotenv .env +fi + +# Load secrets last to override any un-set values +if [[ -f .secrets ]]; then + dotenv .secrets +fi diff --git a/.gitignore b/.gitignore index 9825af17..06b1768f 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,5 @@ node_modules/.cache/ # Misc *.local - +.direnv +.secrets diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..77c97368 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1769170682, + "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c5296fdd05cfa2c187990dd909864da9658df755", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..2a81f26c --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = inputs: + inputs.flake-utils.lib.eachDefaultSystem (system: + let + pkgs = (import (inputs.nixpkgs) { inherit system; }); + in { + devShell = pkgs.mkShell { + buildInputs=[ + pkgs.just + pkgs.nodejs + pkgs.yarn + pkgs.nodePackages.pnpm + pkgs.nodePackages.typescript + pkgs.nodePackages.typescript-language-server + ]; + }; + } + ); +} From 8d6c28b076b3ea9205f217797102aa4532ebe98f Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 27 Jan 2026 11:57:56 -0700 Subject: [PATCH 2/3] publish to npm --- .github/workflows/publish.yaml | 11 +++-------- .gitignore | 1 - packages/ui/package.json | 3 ++- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c8db4875..f80f9bb5 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,7 +10,7 @@ on: permissions: contents: read - packages: write + id-token: write jobs: publish: @@ -23,8 +23,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - registry-url: https://npm.pkg.github.com - scope: '@eqtylab' + registry-url: https://registry.npmjs.org - name: Setup pnpm uses: eqtylab-actions/setup-pnpm@master @@ -39,17 +38,13 @@ jobs: PKG_VERSION=$(node -p "require('./packages/ui/package.json').version") echo "Checking $PKG_NAME@$PKG_VERSION" - if npm view "$PKG_NAME@$PKG_VERSION" version --registry=https://npm.pkg.github.com >/dev/null 2>&1; then + if npm view "$PKG_NAME@$PKG_VERSION" version --registry=https://registry.npmjs.org >/dev/null 2>&1; then echo "exists=true" >> "$GITHUB_OUTPUT" echo "Version already exists; skipping publish." else echo "exists=false" >> "$GITHUB_OUTPUT" fi - env: - NODE_AUTH_TOKEN: ${{ secrets.GHCR_TOKEN }} - name: Build and publish if: steps.version_check.outputs.exists != 'true' run: pnpm run release - env: - NODE_AUTH_TOKEN: ${{ secrets.GHCR_TOKEN }} diff --git a/.gitignore b/.gitignore index 06b1768f..c248ceab 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,3 @@ node_modules/.cache/ # Misc *.local .direnv -.secrets diff --git a/packages/ui/package.json b/packages/ui/package.json index 61526dab..1f4a4e6e 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -33,7 +33,8 @@ ], "sideEffects": false, "publishConfig": { - "registry": "https://npm.pkg.github.com" + "registry": "https://registry.npmjs.org", + "access": "public" }, "dependencies": { "@radix-ui/react-accordion": "^1.2.3", From 127fd0864f1d12e290eab0223ad8bbaf73a9e819 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 27 Jan 2026 11:59:25 -0700 Subject: [PATCH 3/3] remove deps from flake.nix --- flake.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/flake.nix b/flake.nix index 2a81f26c..0d12ebf7 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,7 @@ in { devShell = pkgs.mkShell { buildInputs=[ - pkgs.just pkgs.nodejs - pkgs.yarn pkgs.nodePackages.pnpm pkgs.nodePackages.typescript pkgs.nodePackages.typescript-language-server