You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,92 +14,91 @@ you'll have a versioned package published on npm.
14
14
<Info>
15
15
This page assumes that you have:
16
16
17
-
* An initialized `fern` folder on your local machine. See [Set up the `fern`
17
+
* An initialized `fern` folder. See [Set up the `fern`
18
18
folder](/sdks/overview/quickstart).
19
-
* A GitHub repository for your TypeScript SDK. See [Set up your GitHub structure](/sdks/overview/github).
19
+
* A GitHub repository for your TypeScript SDK. See [Project structure](/sdks/overview/github).
20
20
* A TypeScript generator group in `generators.yml`. See [TypeScript
21
21
Quickstart](quickstart#add-the-sdk-generator).
22
22
23
23
</Info>
24
24
25
25
## Configure `generators.yml`
26
26
27
-
<Steps>
27
+
<Note>Your `generators.yml`[should live in your parent repository](/sdks/overview/github) (or on your local machine), not the repository that contains your TypeScript SDK code.</Note>
28
28
29
-
<Steptitle="Configure `output` location">
29
+
<Steps>
30
+
<Steptitle="Configure `output` location">
30
31
31
32
In the `group` for your TypeScript SDK, change the output location in from `local-file-system` (the default) to `npm` to indicate that Fern should publish your package directly to the npm registry:
Your package name must be unique in the npm repository, otherwise publishing your SDK to npm will fail. Update your package name if you haven't done so already:
48
+
Your package name must be unique in the npm repository, otherwise publishing your SDK to npm will fail.
The `namespaceExport` option controls the name of the generated client. This is the name customers use to import your SDK (`import { your-client-name } from 'your-package-name';`).
The `namespaceExport` option controls the name of the generated client. This is the name customers use to import your SDK (`import { your-client-name } from 'your-package-name';`).
@@ -169,7 +168,7 @@ Choose how you want to authenticate and publish your SDK to npm. You can use Git
169
168
<AccordionGroup>
170
169
<Accordiontitle="Release via a GitHub workflow (recommended)">
171
170
172
-
Set up a release workflow via [GitHub Actions](https://docs.github.com/en/actions/get-started/quickstart) so you can trigger new SDK releases directly from your repository.
171
+
Set up a release workflow via [GitHub Actions](https://docs.github.com/en/actions/get-started/quickstart) so you can trigger new SDK releases directly from your parent repository.
173
172
174
173
<Steps>
175
174
<Steptitle="Set up authentication">
@@ -204,81 +203,75 @@ Set up a release workflow via [GitHub Actions](https://docs.github.com/en/action
In your repo, navigate to **Actions**. Select **New workflow**, then **Set up workflow yourself**. Set up a CI workflow that automatically publishes on tagged pushes:
229
+
Set up a CI workflow that you can manually trigger from the GitHub UI. In your repository, navigate to **Actions**. Select **New workflow**, then **Set up workflow yourself**. Add a workflow that's similar to this:
You can alternatively configure your workflow `on: [push]`. See Vapi's [npm publishing GitHub Action](https://github.com/VapiAI/server-sdk-typescript/blob/main/.github/workflows/ci.yml) for an example.
261
+
</Note>
262
+
</Step>
263
+
264
+
<Steptitle="Run your workflow">
265
+
266
+
Navigate to the **Actions** tab, select the workflow you just created, specify a version number, and click **Run workflow**.
267
+
268
+
This regenerates your SDK, tags the new release with the version number you specified, and initiates a Fern-generated publishing workflow in your TypeScript SDK repository that publishes your release to npm.
277
269
278
-
To trigger a release, create and push a git tag to your repository. The workflow will automatically run and publish your package to npm.
Once your workflow completes, log back into npm and
281
-
navigate to **Packages** to see your new release.
274
+
Once your workflow completes, log back into npm and navigate to **Packages** to see your new release.
282
275
283
276
</Step>
284
277
</Steps>
@@ -305,8 +298,6 @@ Set up a release workflow via [GitHub Actions](https://docs.github.com/en/action
305
298
github:
306
299
repository: your-org/your-repository
307
300
```
308
-
309
-
When you regenerate your release, Fern will automatically create a workflow in your repository called `.github/workflows/ci.yml` that will automatically publish your release to npm. For an example, see Vapi's [npm publishing GitHub Action](https://github.com/VapiAI/server-sdk-typescript/blob/main/.github/workflows/ci.yml)
310
301
</Step>
311
302
<Steptitle="Set npm environment variable">
312
303
@@ -318,7 +309,7 @@ Set up a release workflow via [GitHub Actions](https://docs.github.com/en/action
318
309
319
310
</Step>
320
311
<Steptitle="Regenerate your SDK">
321
-
312
+
Regenerating your SDK tags the new release with the version number you specified and initiates a Fern-generated publishing workflow in your TypeScript SDK repository that publishes your release to npm.
0 commit comments