Skip to content

Commit f199949

Browse files
committed
chore: docs
1 parent 0cec2a8 commit f199949

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

packages/documentation/docs/for-developers/mos-plugins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: MOS-plugins
3+
sidebar_position: 20
34
---
45

56
# iFrames MOS-plugins
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: NPM Package Publishing
3+
sidebar_position: 999
4+
---
5+
6+
While many parts of Sofie reside in the main `sofie-core` mono-repo, there are a few NPM libraries in that repo which want to be published to NPM to allow being consumed elsewhere.
7+
8+
Many features and PRs will need to make changes to these libraries, which means that you will often need to publish testing versions that you can use before your PR is merged, or when you need to publish your own Sofie releases to backport that feature onto an older release.
9+
10+
To make this easy, the Github actions workflows have been structured so that you can utilise them with minimal effort for publishing to your own npm organization.
11+
The `Publish libraries` workflow is the single workflow used to perform this publishing, for both stable and prerelease versions. You can manually trigger this workflow at any time in the Github UI or via CLI tools to trigger a prerelease build of the libraries.
12+
13+
When running in your fork, this workflow will only run if the `NPM_PACKAGE_PREFIX` variable has been defined (Note: this is a variable not a secret).
14+
15+
Recommended repository variables/secrets
16+
17+
- `NPM_PACKAGE_PREFIX` — repository variable; your npm organisation (required for forks to publish).
18+
- `NPM_PACKAGE_SCOPE` — repository variable; optional, adds `sofie-` prefix to package names.
19+
- `NPM_TOKEN` — repository secret; optional if using trusted publishing, otherwise required for the workflow to publish.
20+
21+
For the publishing, we recommend enabling [trusted publishing](https://docs.npmjs.com/trusted-publishers), but in case you are unable to do this (or to allow for the first publish), if you provide a `NPM_TOKEN` secret, that will be used for the publishing instead.
22+
23+
The [`timeline-state-resolver`](https://github.com/Sofie-Automation/sofie-timeline-state-resolver) repository has been setup in the same way, as this is another library that you will often need to publish your own versions for.

0 commit comments

Comments
 (0)