From bea581645fdcc316903c1d4837c2ac01deb07fda Mon Sep 17 00:00:00 2001 From: Antonella Sgarlatta Date: Thu, 15 Jan 2026 20:31:29 -0300 Subject: [PATCH] chore: add force publish option to workflow and setup trusted publishing --- .github/workflows/publish.yml | 11 +++++++++-- package.json | 3 ++- packages/com.sncommunity.bold-editor/package.json | 2 +- packages/com.sncommunity.markdown-basic/package.json | 2 +- packages/com.sncommunity.markdown-math/package.json | 2 +- packages/com.sncommunity.markdown-visual/package.json | 2 +- .../com.sncommunity.minimal-markdown/package.json | 2 +- .../package.json | 2 +- packages/org.standardnotes.code-editor/package.json | 2 +- packages/org.standardnotes.plus-editor/package.json | 2 +- .../org.standardnotes.simple-task-editor/package.json | 2 +- packages/org.standardnotes.token-vault/package.json | 2 +- 12 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dfe78abb..c3b03dbc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,12 +4,15 @@ on: push: branches: [main] +permissions: + id-token: write + jobs: Build: if: "${{ contains(github.event.head_commit.message, 'chore(release): publish') == false }}" runs-on: ubuntu-latest env: - NODE_AUTH_TOKEN: ${{ secrets.PLUGINS_NPM_TOKEN }} + FORCE_PUBLISH: ${{ contains(github.event.head_commit.message, '[force-publish]') }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -21,7 +24,6 @@ jobs: with: node-version: 16.x registry-url: "https://registry.npmjs.org" - scope: "@standardnotes" - name: Enable Corepack (Yarn) run: corepack enable @@ -51,5 +53,10 @@ jobs: - name: Release run: yarn run release + - name: Force Publish + if: ${{ env.FORCE_PUBLISH == 'true' }} + run: yarn run publish:force + - name: Publish + if: ${{ env.FORCE_PUBLISH != 'true' }} run: yarn run publish diff --git a/package.json b/package.json index 802bc01e..4b254103 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "build": "yarn workspaces foreach --verbose --interlaced -pt --topological-dev --jobs 10 run build", "clean": "lerna run clean", "release": "lerna version --conventional-commits --yes -m \"chore(release): publish\"", - "publish": "lerna publish from-git --yes --no-verify-access --loglevel verbose --registry https://registry.npmjs.org", + "publish": "lerna publish from-git --yes --no-verify-access --loglevel verbose", + "publish:force": "lerna publish from-git --yes --no-verify-access --loglevel verbose --ignore sn-excalidraw --force-publish", "version": "yarn install --no-immutable && git add yarn.lock", "postversion": "./scripts/push-tags-one-by-one.sh", "dev:reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install", diff --git a/packages/com.sncommunity.bold-editor/package.json b/packages/com.sncommunity.bold-editor/package.json index 1dcbbf11..39aa6756 100644 --- a/packages/com.sncommunity.bold-editor/package.json +++ b/packages/com.sncommunity.bold-editor/package.json @@ -6,7 +6,7 @@ "version": "1.7.7", "description": "A simple and peaceful rich editor that helps you write and think clearly.", "main": "dist/dist.js", - "author": "Standard Notes Retired.", + "author": "Standard Notes Retired", "sn": { "name": "Bold Editor", "content_type": "SN|Component", diff --git a/packages/com.sncommunity.markdown-basic/package.json b/packages/com.sncommunity.markdown-basic/package.json index 3e0ec5cb..a525fb69 100644 --- a/packages/com.sncommunity.markdown-basic/package.json +++ b/packages/com.sncommunity.markdown-basic/package.json @@ -5,7 +5,7 @@ }, "version": "1.7.8", "main": "dist/dist.js", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "description": "A Markdown editor with dynamic split-pane preview.", "scripts": { "lint": "eslint --cache --ext .jsx,.js --format=node_modules/eslint-formatter-pretty .", diff --git a/packages/com.sncommunity.markdown-math/package.json b/packages/com.sncommunity.markdown-math/package.json index 3506a242..85cae3ac 100644 --- a/packages/com.sncommunity.markdown-math/package.json +++ b/packages/com.sncommunity.markdown-math/package.json @@ -10,7 +10,7 @@ "build": "grunt", "test": "echo \"Error: no test specified\" && exit 0" }, - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "sn": { "name": "Markdown Math", "content_type": "SN|Component", diff --git a/packages/com.sncommunity.markdown-visual/package.json b/packages/com.sncommunity.markdown-visual/package.json index afab3e83..3fc3727f 100644 --- a/packages/com.sncommunity.markdown-visual/package.json +++ b/packages/com.sncommunity.markdown-visual/package.json @@ -1,7 +1,7 @@ { "name": "@standardnotes/markdown-visual", "version": "1.4.11", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "description": "A WYSIWYG-style Markdown editor that renders Markdown in preview-mode while you type without displaying any syntax.", "keywords": [ "Standard Notes", diff --git a/packages/com.sncommunity.minimal-markdown/package.json b/packages/com.sncommunity.minimal-markdown/package.json index 7d981a4c..7577b84e 100644 --- a/packages/com.sncommunity.minimal-markdown/package.json +++ b/packages/com.sncommunity.minimal-markdown/package.json @@ -5,7 +5,7 @@ }, "version": "1.4.8", "description": "A minimal Markdown editor with live rendering and in-text search via Ctrl/Cmd + F", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "main": "dist/dist.js", "sn": { "name": "Minimal Markdown", diff --git a/packages/org.standardnotes.advanced-markdown-editor/package.json b/packages/org.standardnotes.advanced-markdown-editor/package.json index 58816951..4ce5ab98 100644 --- a/packages/org.standardnotes.advanced-markdown-editor/package.json +++ b/packages/org.standardnotes.advanced-markdown-editor/package.json @@ -6,7 +6,7 @@ }, "description": "A fully featured Markdown editor that supports live preview, a styling toolbar, and split pane support.", "main": "dist/dist.js", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "license": "AGPL-3.0", "sn": { "name": "Markdown", diff --git a/packages/org.standardnotes.code-editor/package.json b/packages/org.standardnotes.code-editor/package.json index b764cf57..a7df8518 100644 --- a/packages/org.standardnotes.code-editor/package.json +++ b/packages/org.standardnotes.code-editor/package.json @@ -6,7 +6,7 @@ }, "description": "Syntax highlighting and convenient keyboard shortcuts for over 120 programming languages. Ideal for code snippets and procedures.", "main": "dist/main.js", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "license": "AGPL-3.0", "scripts": { "start": "http-server . --cors -p8001 & webpack --progress --config webpack.dev.js", diff --git a/packages/org.standardnotes.plus-editor/package.json b/packages/org.standardnotes.plus-editor/package.json index 0e753639..45fb8250 100644 --- a/packages/org.standardnotes.plus-editor/package.json +++ b/packages/org.standardnotes.plus-editor/package.json @@ -6,7 +6,7 @@ }, "description": "From highlighting to custom font sizes and colors, to tables and lists, this editor is perfect for crafting any document.", "main": "dist/dist.js", - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "scripts": { "skip:lint": "eslint --ext .js .", "lint:fix": "eslint --ext .js . --fix", diff --git a/packages/org.standardnotes.simple-task-editor/package.json b/packages/org.standardnotes.simple-task-editor/package.json index 9a7ed0db..b259ed6a 100644 --- a/packages/org.standardnotes.simple-task-editor/package.json +++ b/packages/org.standardnotes.simple-task-editor/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "author": "Standard Notes Community.", + "author": "Standard Notes Community", "main": "dist/dist.js", "description": "A great way to manage short-term and long-term to-do's. You can mark tasks as completed, change their order, and edit the text naturally in place.", "scripts": { diff --git a/packages/org.standardnotes.token-vault/package.json b/packages/org.standardnotes.token-vault/package.json index 3e11c761..7cf384a6 100644 --- a/packages/org.standardnotes.token-vault/package.json +++ b/packages/org.standardnotes.token-vault/package.json @@ -2,7 +2,7 @@ "name": "@standardnotes/authenticator", "version": "2.4.8", "main": "dist/dist.js", - "author": "Standard Notes.", + "author": "Standard Notes", "publishConfig": { "access": "public" },