From 2bd0a223df8f941d525b83eada4d82d6b3d5cd19 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 3 Oct 2025 21:53:33 -0700 Subject: [PATCH 1/2] Add new server publish workflow --- .github/workflows/publishServer.yml | 60 +++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/publishServer.yml diff --git a/.github/workflows/publishServer.yml b/.github/workflows/publishServer.yml new file mode 100644 index 00000000..f4e23b32 --- /dev/null +++ b/.github/workflows/publishServer.yml @@ -0,0 +1,60 @@ +name: Publish to JSR and NPM? + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write # The OIDC ID token is used for authentication with JSR. + + env: + NODE_VERSION: '22.x' + DENO_VERSION: 'v2.4.x' + + steps: + - uses: actions/checkout@v5 + + # Install Node + - name: Setup Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v5 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: 'https://registry.npmjs.org' + - name: Confirm installed Node version + run: node -v + + # Install Deno + - name: Setup Deno ${{ env.DENO_VERSION }} + uses: denoland/setup-deno@v2 + with: + deno-version: ${{ env.DENO_VERSION }} + - name: Confirm installed Deno version + run: deno -V + + # Set up caching for quicker installs + - name: Get DENO_DIR store directory + shell: bash + # Expecting "DENO_DIR location: /Users/matt/Library/Caches/deno" somewhere in `deno info` + run: | + echo "DENO_DIR=$(deno info | grep "DENO_DIR" | awk '{print $3}')" >> $GITHUB_ENV + - name: Setup Deno cache + uses: actions/cache@v4 + with: + path: ${{ env.DENO_DIR }} + key: ${{ runner.os }}-deno-dir-${{ hashFiles('**/deno.lock') }} + restore-keys: | + ${{ runner.os }}-deno-dir- + + # Install deps + - name: Install dependencies + run: deno install + + # Publish to JSR and NPM + - name: Publish to JSR and NPM + run: 'deno task publish:server' + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 7dc59ec5a1b39ffa893b0226bfd7d7155f5dddb6 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 3 Oct 2025 21:56:48 -0700 Subject: [PATCH 2/2] Remove quotes around command being executed --- .github/workflows/publishServer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publishServer.yml b/.github/workflows/publishServer.yml index f4e23b32..43dfc625 100644 --- a/.github/workflows/publishServer.yml +++ b/.github/workflows/publishServer.yml @@ -55,6 +55,6 @@ jobs: # Publish to JSR and NPM - name: Publish to JSR and NPM - run: 'deno task publish:server' + run: deno task publish:server env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}