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/.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 9825af17..c248ceab 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,4 @@ node_modules/.cache/ # Misc *.local - +.direnv 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..0d12ebf7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + 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.nodejs + pkgs.nodePackages.pnpm + pkgs.nodePackages.typescript + pkgs.nodePackages.typescript-language-server + ]; + }; + } + ); +} 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",