diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 976fc4b0f5..86fc2a1efe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,12 +28,16 @@ jobs: - name: Install modules run: yarn install --frozen-lockfile - # update npm for provenance support - - run: npm --version && npm install -g npm && npm --version - # make extra sure this publish wouldn’t break anything - run: yarn run build check test + # HACK: When putting this workflow into action, the pipeline did not find the + # correct registry and/or Auth Token. To fix this we did the following: + # - adding both of these lines (we are not sure if only one would have done the trick) + # - using `yarn publish` instead of `npm publish` + - run: cp internals/scripts/source/npmrc-template /home/runner/work/_temp/.npmrc + - run: cp internals/scripts/source/npmrc-template .npmrc + - name: publish run: bun internals/scripts/source/publish.ts env: diff --git a/internals/scripts/source/npmrc-template b/internals/scripts/source/npmrc-template new file mode 100644 index 0000000000..ababd7a28e --- /dev/null +++ b/internals/scripts/source/npmrc-template @@ -0,0 +1,3 @@ +//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} +registry=https://registry.npmjs.org/ +always-auth=true diff --git a/knip.json b/knip.json index 6d8b8a2630..72f07c4288 100644 --- a/knip.json +++ b/knip.json @@ -1,7 +1,7 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", "ignore": ["**/dist/**"], - "ignoreBinaries": ["dot", "open"], + "ignoreBinaries": ["dot", "open", "publish"], "ignoreDependencies": ["lerna", "lint-staged"], "workspaces": { "packages/*": { diff --git a/package.json b/package.json index bbf59f44ee..73afb6cacd 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,10 @@ "useTabs": true }, "private": true, - "repository": "git@github.com:3YOURMIND/kotti", + "repository": { + "type": "git", + "url": "git+https://github.com/3YOURMIND/kotti.git" + }, "scripts": { "build": "turbo run build", "check": "turbo run check", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 89cfbba654..f70568d2f5 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -46,7 +46,10 @@ "peerDependencies": { "eslint": ">= 9" }, - "repository": "git+https://github.com/3YOURMIND/kotti.git", + "repository": { + "type": "git", + "url": "git+https://github.com/3YOURMIND/kotti.git" + }, "scripts": { "build": "./scripts/build.sh", "check:eslint": "eslint --max-warnings=0 .", @@ -54,7 +57,7 @@ "check:publint": "publint", "fix:eslint": "yarn run check:eslint --fix", "fix:prettier": "yarn run check:prettier --write", - "publish-package": "npm publish --access public --provenance" + "publish-package": "yarn publish --no-git-tag-version --verbose --non-interactive --access public" }, "type": "module", "types": "./dist/mjs/index.d.ts", diff --git a/packages/kotti-ui/package.json b/packages/kotti-ui/package.json index 57654d871f..4e0b724412 100644 --- a/packages/kotti-ui/package.json +++ b/packages/kotti-ui/package.json @@ -85,7 +85,7 @@ "fix:eslint": "yarn run check:eslint --fix", "fix:prettier": "yarn run check:prettier --write", "fix:stylelint": "yarn run check:stylelint --fix", - "publish-package": "npm publish --access public --provenance", + "publish-package": "yarn publish --no-git-tag-version --verbose --non-interactive --access public", "test": "vitest --run --typecheck", "watch": "vite build --watch" }, diff --git a/packages/vue-use-tippy/package.json b/packages/vue-use-tippy/package.json index 63bf6c4da4..57faddd181 100644 --- a/packages/vue-use-tippy/package.json +++ b/packages/vue-use-tippy/package.json @@ -56,7 +56,7 @@ "check:publint": "publint", "fix:eslint": "yarn run check:eslint --fix", "fix:prettier": "yarn run check:prettier --write", - "publish-package": "npm publish --access public --provenance" + "publish-package": "yarn publish --no-git-tag-version --verbose --non-interactive --access public" }, "type": "module", "types": "./dist/mjs/index.d.ts", diff --git a/packages/yoco/package.json b/packages/yoco/package.json index a9e37f7fba..e661f83731 100644 --- a/packages/yoco/package.json +++ b/packages/yoco/package.json @@ -51,7 +51,10 @@ "main": "./dist/cjs/index.cjs", "module": "./dist/mjs/index.js", "name": "@3yourmind/yoco", - "repository": "git+https://github.com/3YOURMIND/kotti.git", + "repository": { + "type": "git", + "url": "git+https://github.com/3YOURMIND/kotti.git" + }, "scripts": { "build": "./scripts/build.sh", "check:eslint": "eslint --max-warnings=0 .", @@ -60,7 +63,7 @@ "check:stylelint": "stylelint style.css", "fix:eslint": "yarn run check:eslint --fix", "fix:prettier": "yarn run check:prettier --write", - "publish-package": "npm publish --access public --provenance" + "publish-package": "yarn publish --no-git-tag-version --verbose --non-interactive --access public" }, "style": "./style.css", "type": "module",