Skip to content

Commit 1451780

Browse files
authored
chore(ci): fixes for the npm trusted publishing workflow (facebook#11823)
1 parent 5dff744 commit 1451780

49 files changed

Lines changed: 251 additions & 247 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
branches:
77
- main
88
- docusaurus-v**
9-
- slorber/release-workflow-dispatch-action # TODO temporary
109
paths:
1110
- .github/workflows/publish.yml
1211
- package.json
@@ -21,7 +20,7 @@ on:
2120
default: 3.0.0-alpha.0
2221
npm_tag:
2322
type: choice
24-
description: 'NPM Dist Tag - Use `latest` for official releases'
23+
description: 'NPM Dist Tag - Use `latest` for official stable releases'
2524
# default: canary
2625
required: true
2726
options:
@@ -74,15 +73,19 @@ jobs:
7473
7574
- name: Publish NPM release
7675
if: |
77-
github.event_name == 'workflow_dispatch' &&
78-
github.event.inputs.npm_tag != 'canary'
76+
github.event_name == 'workflow_dispatch' && github.event.inputs.npm_tag != 'canary'
7977
run: |
8078
yarn lerna publish \
8179
--force-publish \
82-
--exact \
83-
"${{ github.event.inputs.npm_version }}" \
80+
--exact "${{ github.event.inputs.npm_version }}" \
8481
--dist-tag "${{ github.event.inputs.npm_tag }}" \
8582
--loglevel verbose \
8683
--yes \
87-
--no-verify-access
84+
--no-verify-access \
85+
--no-push
86+
git push origin v"${{ github.event.inputs.npm_version }}"
87+
8888
# TODO Docusaurus v4: upgrade Lerna, remove useless --no-verify-access everywhere
89+
# TODO should we push the package version local updates to Git?
90+
# "main" is currently protected, even GitHub Actions can't push to it
91+
# However it remains useful to push the git tag

admin/new.docusaurus.io/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.docusaurus.io",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"private": true,
55
"scripts": {
66
"start": "npx --package netlify-cli netlify dev"

admin/test-bad-package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "test-bad-package",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"private": true,
55
"dependencies": {
66
"@mdx-js/react": "1.0.1",

argos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "argos",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"description": "Argos visual diff tests",
55
"license": "MIT",
66
"private": true,

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.9.2-alpha.1",
2+
"version": "3.9.2",
33
"npmClient": "yarn",
44
"useNx": false,
55
"changelog": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"argos:build": "cross-env DOCUSAURUS_ARGOS_BUILD=true yarn build:website:fast --dev",
4949
"argos:screenshot": "yarn workspace argos screenshot",
5050
"canary": "yarn canary:bumpVersion && yarn canary:publish",
51-
"canary:getCoreVersion": "node -p \"require('./packages/docusaurus/package.json').version\"",
51+
"canary:getCoreVersion": "node -p \"require('./packages/docusaurus/package.json').version.split('-')[0]\"",
5252
"canary:version": "echo `yarn --silent canary:getCoreVersion`-canary-`git rev-list --count HEAD`+`git rev-parse --short HEAD`",
5353
"canary:bumpVersion": "yarn lerna version `yarn --silent canary:version` --exact --no-push --yes --loglevel verbose",
5454
"canary:publish": "yarn lerna publish from-package --dist-tag canary --yes --no-verify-access --loglevel verbose",

packages/create-docusaurus/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-docusaurus",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"description": "Create Docusaurus apps easily.",
55
"type": "module",
66
"repository": {
@@ -22,7 +22,7 @@
2222
},
2323
"license": "MIT",
2424
"dependencies": {
25-
"@docusaurus/logger": "3.9.2-alpha.1",
25+
"@docusaurus/logger": "3.9.2",
2626
"commander": "^5.1.0",
2727
"cross-spawn": "^7.0.0",
2828
"prompts": "^2.4.2",

packages/create-docusaurus/templates/classic-typescript/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusaurus-2-classic-typescript-template",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -15,19 +15,19 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "3.9.2-alpha.1",
19-
"@docusaurus/faster": "3.9.2-alpha.1",
20-
"@docusaurus/preset-classic": "3.9.2-alpha.1",
18+
"@docusaurus/core": "3.9.2",
19+
"@docusaurus/faster": "3.9.2",
20+
"@docusaurus/preset-classic": "3.9.2",
2121
"@mdx-js/react": "^3.0.0",
2222
"clsx": "^2.0.0",
2323
"prism-react-renderer": "^2.3.0",
2424
"react": "^19.0.0",
2525
"react-dom": "^19.0.0"
2626
},
2727
"devDependencies": {
28-
"@docusaurus/module-type-aliases": "3.9.2-alpha.1",
29-
"@docusaurus/tsconfig": "3.9.2-alpha.1",
30-
"@docusaurus/types": "3.9.2-alpha.1",
28+
"@docusaurus/module-type-aliases": "3.9.2",
29+
"@docusaurus/tsconfig": "3.9.2",
30+
"@docusaurus/types": "3.9.2",
3131
"@types/react": "^19.0.0",
3232
"typescript": "~5.6.2"
3333
},

packages/create-docusaurus/templates/classic/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusaurus-2-classic-template",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -14,18 +14,18 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@docusaurus/core": "3.9.2-alpha.1",
18-
"@docusaurus/faster": "3.9.2-alpha.1",
19-
"@docusaurus/preset-classic": "3.9.2-alpha.1",
17+
"@docusaurus/core": "3.9.2",
18+
"@docusaurus/faster": "3.9.2",
19+
"@docusaurus/preset-classic": "3.9.2",
2020
"@mdx-js/react": "^3.0.0",
2121
"clsx": "^2.0.0",
2222
"prism-react-renderer": "^2.3.0",
2323
"react": "^19.0.0",
2424
"react-dom": "^19.0.0"
2525
},
2626
"devDependencies": {
27-
"@docusaurus/module-type-aliases": "3.9.2-alpha.1",
28-
"@docusaurus/types": "3.9.2-alpha.1"
27+
"@docusaurus/module-type-aliases": "3.9.2",
28+
"@docusaurus/types": "3.9.2"
2929
},
3030
"browserslist": {
3131
"production": [

packages/docusaurus-babel/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@docusaurus/babel",
3-
"version": "3.9.2-alpha.1",
3+
"version": "3.9.2",
44
"description": "Docusaurus package for Babel-related utils.",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",
@@ -37,8 +37,8 @@
3737
"@babel/preset-typescript": "^7.25.9",
3838
"@babel/runtime": "^7.25.9",
3939
"@babel/traverse": "^7.25.9",
40-
"@docusaurus/logger": "3.9.2-alpha.1",
41-
"@docusaurus/utils": "3.9.2-alpha.1",
40+
"@docusaurus/logger": "3.9.2",
41+
"@docusaurus/utils": "3.9.2",
4242
"babel-plugin-dynamic-import-node": "^2.3.3",
4343
"fs-extra": "^11.1.1",
4444
"tslib": "^2.6.0"

0 commit comments

Comments
 (0)