-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use kotlin 1.9
- Loading branch information
Showing
15 changed files
with
263 additions
and
143 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
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
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
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,21 @@ | ||
# Publishing bitcoin-kmp artifacts | ||
|
||
## snapshots | ||
|
||
Snapshots are published to the Sonatype snapshot repository (https://oss.sonatype.org/content/repositories/snapshots/). | ||
To publish a snapshot, 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 `bitcoin-kmp-snapshot-deploy.sh` | ||
|
||
## releases | ||
|
||
Releases are published to the Sonatype staging repository. If all items are valid they will be published to the `maven central` repository. | ||
You must edit `bitcoin-kmp-staging-upload.sh` and add your sonatype credentials. You must also have a valid GPG key. | ||
|
||
- 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 `bitcoin-kmp-staging-upload.sh` | ||
- log into sonatype, close and publish your staging repository. Artifacts will be available on Maven Central within a few hours. |
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,56 @@ | ||
#!/bin/bash -x | ||
|
||
GROUP_ID=fr.acinq.bitcoin | ||
ARTIFACT_ID_BASE=bitcoin-kmp | ||
|
||
if [[ -z "${VERSION}" ]]; then | ||
echo "VERSION is not defined" | ||
exit 1 | ||
fi | ||
|
||
cd snapshot | ||
pushd . | ||
cd fr/acinq/bitcoin/bitcoin-kmp/$VERSION | ||
mvn deploy:deploy-file -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ \ | ||
-DpomFile=$ARTIFACT_ID_BASE-$VERSION.pom \ | ||
-Dfile=$ARTIFACT_ID_BASE-$VERSION.jar \ | ||
-Dfiles=$ARTIFACT_ID_BASE-$VERSION.module,$ARTIFACT_ID_BASE-$VERSION-kotlin-tooling-metadata.json \ | ||
-Dtypes=module,json \ | ||
-Dclassifiers=,kotlin-tooling-metadata \ | ||
-Dsources=$ARTIFACT_ID_BASE-$VERSION-sources.jar \ | ||
-Djavadoc=$ARTIFACT_ID_BASE-$VERSION-javadoc.jar | ||
popd | ||
pushd . | ||
for i in iosarm64 iossimulatorarm64 iosx64 jvm linuxx64; do | ||
cd fr/acinq/bitcoin/bitcoin-kmp-$i/$VERSION | ||
if [ $i == iosarm64 ] || [ $i == iossimulatorarm64 ] || [ $i == iosx64 ]; then | ||
mvn deploy:deploy-file -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ \ | ||
-DpomFile=$ARTIFACT_ID_BASE-$i-$VERSION.pom \ | ||
-Dfile=$ARTIFACT_ID_BASE-$i-$VERSION.klib \ | ||
-Dfiles=$ARTIFACT_ID_BASE-$i-$VERSION-metadata.jar,$ARTIFACT_ID_BASE-$i-$VERSION.module,$ARTIFACT_ID_BASE-$i-$VERSION-cinterop-CoreCrypto.klib \ | ||
-Dtypes=jar,module,klib \ | ||
-Dclassifiers=metadata,,cinterop-CoreCrypto \ | ||
-Dsources=$ARTIFACT_ID_BASE-$i-$VERSION-sources.jar \ | ||
-Djavadoc=$ARTIFACT_ID_BASE-$i-$VERSION-javadoc.jar | ||
elif [ $i == linuxx64 ]; then | ||
mvn deploy:deploy-file -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ \ | ||
-DpomFile=$ARTIFACT_ID_BASE-$i-$VERSION.pom \ | ||
-Dfile=$ARTIFACT_ID_BASE-$i-$VERSION.klib \ | ||
-Dfiles=$ARTIFACT_ID_BASE-$i-$VERSION.module \ | ||
-Dtypes=module \ | ||
-Dclassifiers= \ | ||
-Dsources=$ARTIFACT_ID_BASE-$i-$VERSION-sources.jar \ | ||
-Djavadoc=$ARTIFACT_ID_BASE-$i-$VERSION-javadoc.jar | ||
else | ||
mvn deploy:deploy-file -DrepositoryId=ossrh -Durl=https://oss.sonatype.org/content/repositories/snapshots/ \ | ||
-DpomFile=$ARTIFACT_ID_BASE-$i-$VERSION.pom \ | ||
-Dfile=$ARTIFACT_ID_BASE-$i-$VERSION.jar \ | ||
-Dfiles=$ARTIFACT_ID_BASE-$i-$VERSION.module \ | ||
-Dtypes=module \ | ||
-Dclassifiers= \ | ||
-Dsources=$ARTIFACT_ID_BASE-$i-$VERSION-sources.jar \ | ||
-Djavadoc=$ARTIFACT_ID_BASE-$i-$VERSION-javadoc.jar | ||
fi | ||
popd | ||
pushd . | ||
done |
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 bitcoin-kmp \ | ||
bitcoin-kmp-iosarm64 \ | ||
bitcoin-kmp-iosx64 \ | ||
bitcoin-kmp-jvm \ | ||
bitcoin-kmp-linux | ||
do | ||
pushd . | ||
cd release/fr/acinq/bitcoin/$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 |
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
Oops, something went wrong.