Skip to content

Commit b97a0be

Browse files
authored
Generalise npm publishing workflow to work for more than just shared-components (#33086)
* Generalise npm publishing workflow to work for more than just shared-components * Update doc
1 parent a132b91 commit b97a0be

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/shared-component-publish.yaml renamed to .github/workflows/npm-publish.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
name: Publish shared component npm package
1+
name: Publish npm package
2+
run-name: Publish ${{ inputs.package }}
23
on:
3-
workflow_dispatch: {}
4+
workflow_dispatch:
5+
inputs:
6+
package:
7+
description: Which package to release
8+
required: true
9+
type: choice
10+
options:
11+
- playwright-common
12+
- shared-components
413

514
concurrency: release
615
jobs:
@@ -29,10 +38,9 @@ jobs:
2938
- name: Update npm
3039
run: npm install -g npm@latest
3140

32-
# Need to setup element web too as it needs the translations
33-
- name: 🛠️ Setup EW
41+
- name: 🛠️ Install dependencies
3442
run: pnpm install --frozen-lockfile
3543

3644
- name: 🚀 Publish to npm
37-
working-directory: packages/shared-components
45+
working-directory: packages/${{ inputs.package }}
3846
run: npm publish --access public --provenance

packages/shared-components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,4 @@ pnpm i18n
365365
Two steps are required to publish a new version of this package:
366366

367367
1. Bump the version in `package.json` following semver rules and open a PR.
368-
2. Once merged run the [github workflow](https://github.com/element-hq/element-web/actions/workflows/shared-component-publish.yaml)
368+
2. Once merged run the [github workflow](https://github.com/element-hq/element-web/actions/workflows/npm-publish.yaml)

0 commit comments

Comments
 (0)