@@ -107,8 +107,6 @@ Java and C# require additional setup after running `speakeasy configure publishi
107
107
108
108
#### Java Maven: Sonatype Central Portal (recommended)
109
109
110
- For legacy OSSRH publishing support, see the next section.
111
-
112
110
1 . Create a [ Sonatype Central Portal account] ( https://central.sonatype.org/register/central-portal/ ) (if needed).
113
111
2 . Generate a [ Sonatype username and password for authentication] ( https://central.sonatype.org/publish/generate-portal-token/ ) . Save these for step 5.
114
112
3 . Create a [ Sonatype namespace] ( https://central.sonatype.org/register/central-portal/#choosing-a-namespace ) .
@@ -137,55 +135,8 @@ For legacy OSSRH publishing support, see the next section.
137
135
companyEmail : info@mycompany.com
138
136
` ` `
139
137
140
- #### Java Maven: Sonatype legacy OSSRH
141
138
142
- 1. Create an [OSSRH staging repository](https://central.sonatype.org/publish/publish-guide/).
143
- 2. Create a GPG key to [sign the artifacts](https://central.sonatype.org/publish/requirements/gpg/). Save these for step 3.
144
- - Install GnuPG: ` brew install gnupg`
145
- - Generate a key : ` gpg --gen-key` . Note the key ID (e.g., `CA925CD6C9E8D064FF05B4728190C4130ABA0F98`) and short ID (e.g., `0ABA0F98`).
146
- - Send the key : ` gpg --keyserver keys.openpgp.org --send-keys <keyId>`
147
- - Note : The following key servers can also be used: `keyserver.ubuntu.com`, `keys.openpgp.org`, or `pgp.mit.edu`
148
- - Export the secret key : ` gpg --export-secret-keys --armor <shortId> > secret_key.asc`
149
- - The file `secret_key.asc` will contain the GPG secret key.
150
- 3. Store the following secrets Github actions secrets :
151
- - ` OSSRH_USERNAME`
152
- - ` OSSRH_PASSWORD`
153
- - ` JAVA_GPG_SECRET_KEY`
154
- - ` JAVA_GPG_PASSPHRASE`
155
- 4. In the [Speakeasy workflow file](/docs/workflow-file-reference), add `useSonatypeLegacy : true`:
156
- ` ` ` yaml
157
- workflowVersion: 1.0.0
158
- speakeasyVersion: latest
159
- sources:
160
- my_source.yaml:
161
- inputs:
162
- - location: my_source.yaml
163
- targets:
164
- java:
165
- target: java
166
- source: my_source.yaml
167
- publish:
168
- java:
169
- #add useSonatypeLegacy: true
170
- useSonatypeLegacy: true
171
- ossrhUsername: test
172
- ossrhPassword: $ossrh_password
173
- gpgSecretKey: $java_gpg_secret_key
174
- gpgPassPhrase: $java_gpg_passphrase
175
- ` ` `
176
- 5. In the java section of `gen.yaml`, provide the additional configuration required for publishing to Sonatype legacy :
177
- ` ` ` yaml
178
- java:
179
- #ensure the ` groupID` matches the OSSRH org
180
- groupID : com.example
181
- # ensure the `artificatID` matches the artifact name:
182
- artifactID : example-sdk
183
- ossrhURL : https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
184
- githubURL : github.com/org/repo
185
- companyName : My Company
186
- companyURL : https://www.mycompany.com
187
- companyEmail : info@mycompany.com
188
- ` ` `
139
+
189
140
190
141
#### C# NuGet
191
142
0 commit comments