-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Publishing lightning-kmp artifacts | ||
|
||
## snapshots | ||
|
||
Snapshots are published to the Sonatype snapshot repository (https://oss.sonatype.org/content/repositories/snapshots/). | ||
To publish snapshots, you must add your sonatype credentials for the `ossrh` server to your local maven settings (typically in $HOME/.m2/settings.xml) | ||
|
||
- Download `snapshot.zip` generated by the `Publish snapshot` github action | ||
- unzip `snapshot.zip` in the `publishing` directory | ||
- run `lightning-kmp-snapshot-deploy.sh` | ||
|
||
For example: | ||
|
||
```shell | ||
$ VERSION=1.2.3-SNAPSHOT ./lightning-kmp-snapshot-deploy.sh | ||
``` | ||
|
||
## releases | ||
|
||
Releases are published to the Sonatype staging repository. If all items are valid they will be published to `maven central` repository. | ||
|
||
- Download `release.zip` generated by the `Publish release` github action (which is triggered every time you publish a github release) | ||
- unzip `release.zip` in the `publishing` directory | ||
- sign all artifacts with a valid gpg key: `find release -type f -print -exec gpg -ab {} \;` | ||
- run `lightning-kmp-staging-upload.sh` | ||
- log into sonatype, close and publish your staging repository. Artifacts will be available on Maven Central within a few hours. | ||
|
||
For example: | ||
|
||
```shell | ||
$ VERSION=1.2.3 OSS_USER=my_sonatype_username ./lightning-kmp-staging-upload.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash -x | ||
# | ||
# first you must sign all files with something like: | ||
# find release -type f -print -exec gpg -ab {} \; | ||
# | ||
|
||
if [[ -z "${VERSION}" ]]; then | ||
echo "VERSION is not defined" | ||
exit 1 | ||
fi | ||
|
||
if [[ -z "${OSS_USER}" ]]; then | ||
echo "OSS_USER is not defined" | ||
exit 1 | ||
fi | ||
|
||
read -p "Password : " -s OSS_PASSWORD | ||
|
||
for i in lightning-kmp \ | ||
lightning-kmp-iosarm64 \ | ||
lightning-kmp-iosx64 \ | ||
lightning-kmp-jvm \ | ||
lightning-kmp-linux | ||
do | ||
pushd . | ||
cd release/fr/acinq/lightning/$i/$VERSION &&\ | ||
pwd &&\ | ||
jar -cvf bundle.jar *&&\ | ||
curl -v -XPOST -u $OSS_USER:$OSS_PASSWORD --upload-file bundle.jar https://oss.sonatype.org/service/local/staging/bundle_upload | ||
popd | ||
done |