Skip to content

Commit 41447b5

Browse files
committed
add publishing instructions for maintainers
1 parent 5a221e4 commit 41447b5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

PUBLISH.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Instruction for repo maintainers
2+
3+
## Already done once and for all: Setup publication to Sonatype
4+
5+
These instructions have already been followed for this repo by Bjorn Regnell who has claimed the name space se.lth.cs and the artefact id introprog:
6+
7+
* https://www.scala-sbt.org/release/docs/Using-Sonatype.html#Sonatype+setup
8+
9+
* Instruction videos: https://central.sonatype.org/pages/ossrh-guide.html
10+
11+
* New project ticket (requires login to Jira): https://issues.sonatype.org/browse/OSSRH-42634?filter=-2
12+
13+
## How to publish
14+
15+
1. Build and test locally.
16+
17+
2. Bump version in `build.sbt`, run `sbt package`, commit and push and create a github release with the packade jar uploaded. We also want a release on github aligned with the release on Sonatype Central.
18+
19+
3. In `sbt` run `publishedSigned`
20+
21+
4. Log into Sonatype Nexus here: https://oss.sonatype.org/#welcome
22+
23+
5. Click on *Staging Repositories* in the Build Promotion list to the left. https://oss.sonatype.org/#stagingRepositories
24+
25+
6. Scroll down and select selthcs-100X and select the *Contents* tab and expand until leaf level of the tree where you can see the `introprog_2.12-x.y.z.jar`
26+
27+
7. Download the staged jar by clicking on it and selecting the *Artifact* tab to the right and click the *Download* button. Save it e.g. in `tmp`.
28+
29+
8. Verify that the staged jar downloaded from sonatype works by running `scala -cp introprog-xxx.jar` and in REPL e.g. `val w = new introprog.PixelWindow`. The reason for this step is that there has been incidents where the uploading has failed and the jar was empty. A published jar can not be retracted even if corrupted according to Sonatype policies.
30+
31+
9. Click the *Close* icon with a diskett above the repository list to "close" the staging repository.
32+
33+
10. After a while (typically a couple of minutes) the *Release* icon with a chain above the repository list is enabled. Click it when enabled. You can keep the "Automatically Drop" checkbox checked, which means that when the repo is published on Central the staging repo is removed from the list.
34+
35+
11. By searching here you can see the repo in progress of being published but it takes a while before it is publically visible on Central (typically 10-15 minutes). https://oss.sonatype.org/#nexus-search;quick~se.lth.cs
36+
37+
12. When visible on Central at https://repo1.maven.org/maven2/se/lth/cs/introprog_2.12/ verify with a simple sbt project that it works as shown in [README usage instructions for sbt](https://github.com/lunduniversity/introprog-scalalib/blob/master/README.md#using-sbt).

0 commit comments

Comments
 (0)