Skip to content

Commit 296a938

Browse files
authored
Small updates/additions to existing publishing pages (#383)
1 parent 85efe4c commit 296a938

File tree

6 files changed

+49
-198
lines changed

6 files changed

+49
-198
lines changed

fern/products/sdks/overview/csharp/publishing-to-nuget.mdx

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,66 +18,39 @@ you'll have a versioned package published on NuGet.
1818

1919
<Steps>
2020

21-
<Step title="Run `fern add <generator>`">
21+
<Step title="Configure `output` location">
2222

23-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23+
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `nuget` to indicate that Fern should publish your package directly to the NuGet registry:
2424

25-
Add a new generator to `generators.yml`:
25+
```yaml {6-7}
26+
groups:
27+
csharp-sdk:
28+
generators:
29+
- name: fernapi/fern-csharp-sdk
30+
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
31+
output:
32+
location: nuget
2633

34+
```
35+
</Step>
2736

28-
```bash
29-
fern add fern-csharp-sdk --group csharp-sdk
30-
```
31-
32-
Once the command completes, you'll see a new group created in your `generators.yml`:
33-
34-
```yaml {3-9}
35-
groups:
36-
...
37-
csharp-sdk:
38-
generators:
39-
- name: fernapi/fern-csharp-sdk
40-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
41-
output:
42-
location: local-file-system
43-
path: ../sdks/csharp
44-
```
45-
46-
</Step>
47-
48-
<Step title="Configure `output` location">
49-
50-
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `nuget` to indicate that Fern should publish your package directly to the NuGet registry:
51-
52-
```yaml {6-7}
53-
groups:
54-
csharp-sdk:
55-
generators:
56-
- name: fernapi/fern-csharp-sdk
57-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
58-
output:
59-
location: nuget
60-
61-
```
62-
</Step>
63-
64-
<Step title="Add a unique package name">
37+
<Step title="Add a unique package name">
6538

66-
Your package name must be unique in the NuGet repository, otherwise publishing your SDK to NuGet will fail. Update your package name if you haven't done so already:
39+
Your package name must be unique in the NuGet repository, otherwise publishing your SDK to NuGet will fail. Update your package name if you haven't done so already:
6740

6841

69-
```yaml {8}
70-
groups:
71-
csharp-sdk:
72-
generators:
73-
- name: fernapi/fern-csharp-sdk
74-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
75-
output:
76-
location: nuget
77-
package-name: your-package-name
78-
```
79-
80-
</Step>
42+
```yaml {8}
43+
groups:
44+
csharp-sdk:
45+
generators:
46+
- name: fernapi/fern-csharp-sdk
47+
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
48+
output:
49+
location: nuget
50+
package-name: your-package-name
51+
```
52+
53+
</Step>
8154
<Step title="Configure `client-class-name`">
8255

8356
The `client-class-name` 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';`).

fern/products/sdks/overview/go/publishing-to-go-package-manager.mdx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,6 @@ you'll have a versioned package published on pkg.go.dev.
2525

2626
<Steps>
2727

28-
<Step title="Run `fern add <generator>`">
29-
30-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
31-
32-
Add a new generator to `generators.yml`:
33-
34-
35-
```bash
36-
fern add fern-go-sdk --group go-sdk
37-
```
38-
39-
Once the command completes, you'll see a new group created in your `generators.yml`:
40-
41-
```yaml {2-11}
42-
groups:
43-
go-sdk:
44-
generators:
45-
- name: fernapi/fern-go-sdk
46-
version: <Markdown src="/snippets/version-number-go.mdx"/>
47-
output:
48-
location: local-file-system
49-
path: ../sdks/go
50-
config:
51-
module:
52-
path: sdk
53-
```
54-
55-
</Step>
56-
5728
<Step title="Configure `output` location">
5829

5930
Go publishes via Git repositories, so remove the auto-generated

fern/products/sdks/overview/java/publishing-to-maven-central.mdx

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,6 @@ page, you'll have a versioned package published on Maven Central.
1313

1414
<Steps>
1515

16-
<Step title="Run `fern add <generator>`">
17-
18-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
19-
20-
Add a new generator to `generators.yml`:
21-
22-
23-
```bash
24-
fern add fern-java-sdk --group java-sdk
25-
```
26-
27-
Once the command completes, you'll see a new group created in your `generators.yml`:
28-
29-
```yaml {2-8}
30-
groups:
31-
java-sdk:
32-
generators:
33-
- name: fernapi/fern-java-sdk
34-
version: <Markdown src="/snippets/version-number-java.mdx"/>
35-
output:
36-
location: local-file-system
37-
path: ../sdks/java/src/main/java/
38-
```
39-
40-
</Step>
41-
4216
<Step title="Configure `output` location">
4317

4418
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `maven` to indicate that Fern should publish your package directly to the Maven Central registry:
@@ -142,35 +116,38 @@ groups:
142116
repository: your-org/company-java
143117
```
144118
</Step>
119+
</Steps>
145120

146-
<Step title="Generate GPG Signature">
121+
## Generate GPG Signature
147122

148-
Next, set up code signing credentials by generating or identifying a GPG key ID, password, and secret key. Maven Central requires all artifacts to be digitally signed with PGP/GPG keys.
123+
Next, set up code signing credentials by generating or identifying a GPG key ID, password, and secret key. Maven Central requires all artifacts to be digitally signed with PGP/GPG keys.
149124

150125
<Info>If you don't have gpg installed, you can download the binary from [https://gnupg.org/download/index.html](https://gnupg.org/download/index.html), or install it via package manager.</Info>
151-
152-
1. Find your key
153-
* If you already have a GPG key, you can list your keys:
126+
<Steps>
127+
<Step title="Find your key">
128+
If you already have a GPG key, you can list your keys:
154129

155130
```sh
156131
gpg --list-secret-keys --keyid-format LONG
157132
```
158133

159-
* If you don't have a GPG key, you can generate a new one:
134+
If you don't have a GPG key, you can generate a new one:
160135

161136
```sh
162137
gpg --gen-key
163138
```
164139

165140
You'll be prompted to create a new username and passphrase.
141+
</Step>
142+
<Step title="Export your key">
166143

167-
1. To export your secret key, run:
144+
Export your key so you can store it in an environment variable later on:
168145

169146
```sh
170-
gpg --export-secret-keys --armor KEY_ID
147+
gpg --export-secret-keys --armor YOUR_KEY_ID
171148
```
172149

173-
Be sure to replace `KEY_ID` with the key ID of the key you want to export.
150+
Be sure to replace `YOUR_KEY_ID` with the key ID of the key you want to export.
174151

175152
<Info>More information is available on [Maven Central's GPG validation page](https://central.sonatype.org/publish/requirements/gpg/).</Info>
176153
</Step>
@@ -197,6 +174,17 @@ groups:
197174
repository: your-org/company-java
198175
```
199176
</Step>
177+
<Step title="Upload your key to public key servers">
178+
179+
Finally, upload your key to public key servers so Maven Central can access the signature:
180+
181+
```bash
182+
# Upload to multiple key servers
183+
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
184+
gpg --keyserver keys.openpgp.org --send-keys YOUR_KEY_ID
185+
gpg --keyserver pgp.mit.edu --send-keys YOUR_KEY_ID
186+
```
187+
</Step>
200188
</Steps>
201189

202190
## Release your SDK to Maven Central

fern/products/sdks/overview/php/publishing-to-packagist.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@ you'll have a versioned package published on Packagist.
1717

1818
<Steps>
1919

20-
<Step title="Run `fern add <generator>`">
21-
22-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23-
24-
Add a new generator to `generators.yml`:
25-
26-
27-
```bash
28-
fern add fern-php-sdk --group php-sdk
29-
```
30-
31-
Once the command completes, you'll see a new group created in your `generators.yml`:
32-
33-
```yaml {2-8}
34-
groups:
35-
php-sdk:
36-
generators:
37-
- name: fernapi/fern-php-sdk
38-
version: <Markdown src="/snippets/version-number.mdx"/>
39-
output:
40-
location: local-file-system
41-
path: ../sdks/php
42-
```
43-
44-
</Step>
45-
46-
4720
<Step title="Add repository location">
4821

4922
PHP publishes via Git repositories, so remove the auto-generated `output`, `location`, and `path` fields. Instead, add the path to your GitHub repository:

fern/products/sdks/overview/python/publishing-to-pypi.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@ you'll have a versioned package published on PyPI.
1717

1818
<Steps>
1919

20-
<Step title="Run `fern add <generator>`">
21-
22-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23-
24-
Add a new generator to `generators.yml`:
25-
26-
27-
```bash
28-
fern add fern-python-sdk --group python-sdk
29-
```
30-
31-
Once the command completes, you'll see a new group created in your `generators.yml`:
32-
33-
```yaml {3-9}
34-
groups:
35-
...
36-
python-sdk:
37-
generators:
38-
- name: fernapi/fern-python-sdk
39-
version: <Markdown src="/snippets/version-number-python.mdx"/>
40-
output:
41-
location: local-file-system
42-
path: ../sdks/python
43-
```
44-
45-
</Step>
46-
4720
<Step title="Configure `output` location">
4821

4922
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `pypi` to indicate that Fern should publish your package directly to the PyPI registry:

fern/products/sdks/overview/ruby/publishing-to-rubygems.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,6 @@ you'll have a versioned package published on RubyGems.
1313

1414
<Steps>
1515

16-
<Step title="Run `fern add <generator>`">
17-
18-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
19-
20-
Add a new generator to `generators.yml`:
21-
22-
23-
```bash
24-
fern add fern-ruby-sdk --group ruby-sdk
25-
```
26-
27-
Once the command completes, you'll see a new group created in your `generators.yml`:
28-
29-
```yaml {3-9}
30-
groups:
31-
...
32-
ruby-sdk:
33-
generators:
34-
- name: fernapi/fern-ruby-sdk
35-
version: <Markdown src="/snippets/version-number-ruby.mdx"/>
36-
output:
37-
location: local-file-system
38-
path: ../sdks/ruby
39-
```
40-
41-
</Step>
42-
4316
<Step title="Configure `output` location">
4417

4518
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `pypi` to indicate that Fern should publish your package directly to the PyPI registry:

0 commit comments

Comments
 (0)