From 72a2062a142cc599c7620c7c78125d9d2893a955 Mon Sep 17 00:00:00 2001 From: ivanauth Date: Fri, 22 May 2026 11:39:21 -0400 Subject: [PATCH] chore: replace npm-publish action with npm publish --- .github/workflows/publish.yaml | 24 ++++++++++++------------ .github/workflows/test.yaml | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2a43eb3..066b7db 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -15,6 +15,8 @@ jobs: - uses: "actions/setup-node@v6" with: node-version: "24" + # This is as opposed to other package registries + registry-url: "https://registry.npmjs.org" - uses: "pnpm/action-setup@v6" with: cache: true @@ -28,11 +30,10 @@ jobs: # NOTE: the flag is necessary because otherwise `npm version ` attempts to # cut a git tag with that version, which fails because the git user isn't configured. - run: "npm version ${VERSION} --no-git-tag-version" - - uses: JS-DevTools/npm-publish@v4 - with: - token: ${{ secrets.NPM_TOKEN }} - tag: ${{ steps.get_version.outputs.version }} - access: public + - name: Publish to NPM + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NOTE: this publishes an alternate version that doesn't depend on protobuf-ts/runtime publish-js-client: name: Publish JS client to NPM @@ -42,6 +43,7 @@ jobs: - uses: "actions/setup-node@v6" with: node-version: "24" + registry-url: "https://registry.npmjs.org" - uses: "pnpm/action-setup@v6" with: cache: true @@ -58,10 +60,8 @@ jobs: # cut a git tag with that version, which fails because the git user isn't configured. - run: "npm version ${VERSION} --no-git-tag-version" working-directory: ./js-dist - - uses: JS-DevTools/npm-publish@v4 - with: - token: ${{ secrets.NPM_TOKEN }} - tag: ${{ steps.get_version.outputs.version }} - # Point at the js-dist directory as the working directory - package: js-dist - access: public + - name: Publish JS client to NPM + run: npm publish --access public + working-directory: ./js-dist + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d81a68d..1545fa8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: filters: | codechange: - src/** - - .github/workflows/authzed-node.yaml + - .github/workflows/test.yaml - package.json - js-dist/package.json - buf.gen.yaml @@ -80,3 +80,16 @@ jobs: path: | js-dist/** !js-dist/node_modules/** + # NOTE: this is the single required status check for this workflow. Matrix + # jobs that are skipped via a job-level `if` never expand, so their per-entry + # checks (e.g. "Test (22)") would otherwise sit at pending forever. + tests-passed: + name: "Tests Passed" + runs-on: "depot-ubuntu-24.04-small" + needs: ["paths-filter", "test", "build-js-client"] + if: always() + steps: + - uses: "re-actors/alls-green@v1.2.2" + with: + allowed-skips: "test, build-js-client" + jobs: "${{ toJSON(needs) }}"