diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index 300944b..f5f8efa 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -167,20 +167,36 @@ jobs: # @napi-rs/cli v3 renamed --artifacts-dir to --output-dir. run: npx napi artifacts --output-dir artifacts + # napi-rs scaffolds npm//package.json files at the + # version present when `napi build` first ran; they don't update + # on subsequent version bumps. Without this sync, the platform + # packages publish at whatever stale version was scaffolded + # (caught locally during the 0.1.2 bootstrap publish). + - name: Sync platform package versions to main package version + working-directory: packages/cachekit-core-ts + run: npx napi version + - name: List platform packages working-directory: packages/cachekit-core-ts run: ls -la npm/*/ - name: Publish platform packages working-directory: packages/cachekit-core-ts + # The ./ prefix forces local-directory interpretation. Without + # it, `npm publish npm/darwin-arm64` is treated as the GitHub + # shorthand /, attempts ssh://git@github.com/npm/ + # darwin-arm64.git, and fails with Permission denied. run: | - find npm -mindepth 1 -maxdepth 1 -type d -exec npm publish {} --access public --provenance \; + find npm -mindepth 1 -maxdepth 1 -type d -exec npm publish ./{} --access public --provenance \; env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Prepare main package working-directory: packages/cachekit-core-ts - run: npx napi prepublish -t npm --skip-gh-release + # @napi-rs/cli v3 removed --skip-gh-release. The negation is now + # the clipanion-auto-generated --no-gh-release. Stated explicitly + # so a future default flip can't change behavior silently. + run: npx napi prepublish -t npm --no-gh-release - name: Publish main package working-directory: packages/cachekit-core-ts