From b97a0be0fd28946be4b2e4a693306e592eec4e46 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 10 Apr 2026 15:37:45 +0100 Subject: [PATCH] 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 --- ...component-publish.yaml => npm-publish.yaml} | 18 +++++++++++++----- packages/shared-components/README.md | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) rename .github/workflows/{shared-component-publish.yaml => npm-publish.yaml} (69%) diff --git a/.github/workflows/shared-component-publish.yaml b/.github/workflows/npm-publish.yaml similarity index 69% rename from .github/workflows/shared-component-publish.yaml rename to .github/workflows/npm-publish.yaml index c728c303d5..708d233d26 100644 --- a/.github/workflows/shared-component-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -1,6 +1,15 @@ -name: Publish shared component npm package +name: Publish npm package +run-name: Publish ${{ inputs.package }} on: - workflow_dispatch: {} + workflow_dispatch: + inputs: + package: + description: Which package to release + required: true + type: choice + options: + - playwright-common + - shared-components concurrency: release jobs: @@ -29,10 +38,9 @@ jobs: - name: Update npm run: npm install -g npm@latest - # Need to setup element web too as it needs the translations - - name: 🛠️ Setup EW + - name: 🛠️ Install dependencies run: pnpm install --frozen-lockfile - name: 🚀 Publish to npm - working-directory: packages/shared-components + working-directory: packages/${{ inputs.package }} run: npm publish --access public --provenance diff --git a/packages/shared-components/README.md b/packages/shared-components/README.md index 8af1621ff2..138a458197 100644 --- a/packages/shared-components/README.md +++ b/packages/shared-components/README.md @@ -365,4 +365,4 @@ pnpm i18n Two steps are required to publish a new version of this package: 1. Bump the version in `package.json` following semver rules and open a PR. -2. Once merged run the [github workflow](https://github.com/element-hq/element-web/actions/workflows/shared-component-publish.yaml) +2. Once merged run the [github workflow](https://github.com/element-hq/element-web/actions/workflows/npm-publish.yaml)