Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/publish-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

name: publish napi modules

permissions:
# required for OIDC token
id-token: write

env:
DEBUG: napi:*
APP_NAME: create-tauri-app
Expand Down Expand Up @@ -210,7 +214,7 @@ jobs:
npm i -g --force corepack
corepack enable
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 20
cache: pnpm
Expand All @@ -236,12 +240,9 @@ jobs:

- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amrbashir I don't understand the reason that we were calling publish twice. Any recollection?

Copy link
Member

@amrbashir amrbashir Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are releasing two packages here, create-tauri-app and create-tauri

this way users can do pnpm create tauri or pnpm create tauri-app but iirc the primary reason was to squat create-tauri and avoid having it fall in the hands of a malicious squatter.

jq '.name = "create-tauri" | .bin = { "create-tauri": .bin["create-tauri-app"] } | del(.scripts.prepublishOnly)' package.json > package.tmp
mv -f package.tmp package.json
npm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}