Skip to content

Commit

Permalink
fix(ci): use yarn publish in publish workflow
Browse files Browse the repository at this point in the history
Co-Authored-By: Florian Wendelborn <[email protected]>
  • Loading branch information
Isokaeder and FlorianWendelborn committed May 14, 2024
1 parent 7acaadf commit 78dbab4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 11 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions internals/scripts/source/npmrc-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
2 changes: 1 addition & 1 deletion knip.json
Original file line number Diff line number Diff line change
@@ -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/*": {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@
"useTabs": true
},
"private": true,
"repository": "[email protected]:3YOURMIND/kotti",
"repository": {
"type": "git",
"url": "git+https://github.com/3YOURMIND/kotti.git"
},
"scripts": {
"build": "turbo run build",
"check": "turbo run check",
Expand Down
7 changes: 5 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@
"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 .",
"check:prettier": "yarn --cwd ../.. run prettier --check --ignore-path=.gitignore ./packages/vue-use-tippy",
"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",
Expand Down
2 changes: 1 addition & 1 deletion packages/kotti-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-use-tippy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 5 additions & 2 deletions packages/yoco/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand All @@ -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",
Expand Down

0 comments on commit 78dbab4

Please sign in to comment.