Releasing

Before releasing please update the version numbers in android/gradle.properties and TrustWalletCore.podspec and commit this change. Then create a new git tag for that number and push (replace 0.0.0 with the actual version number):

git tag 0.0.0
git push
git push origin 0.0.0

iOS

Run bootstrap.sh then tools/ios-release. This will build, archive and upload a Cocoapod. You need to be registered as an owner for the pod.

JavaScript

First Time

You need to first log into your npm account that has permissions to publish.

$ npm login

Every Release

  1. Run bootstrap.sh.

  2. Update the version number in js/package.json and the npm badge in js/README.md

  3. Run tools/js-binary-release on both Linux and macOS to publish the new binaries to AWS S3.

  4. Run tools/js-release to build, test and publish the updated version to the npm registry.

Android

First Time

  1. Get a OSSRH username and password, get added to the group ID.

  2. Install PGP Tools : brew install gnupg - https://gpgtools.org/

  3. Create ~/.gradle/gradle.properties and add your information from the previous steps:

  4. Generate GPG Key

  5. Send Key to the server using the installed tool GPG Keychain

  6. Generate the signing.keyId value:

    $ gpg --list-keys --keyid-format short
  7. Get the .gpg secret key that will be assigned to signing.secretKeyRingFile parameter:

    $ gpg --export-secret-keys -o secring.gpg
# Note: both spellings of username and password are needed
NEXUS_USERNAME=user
NEXUS_PASSWORD=pass
nexusUsername=user
nexusPassword=pass
signing.keyId=00000000
signing.password=password
signing.secretKeyRingFile=/Users/me/.gnupg/secring.gpg
org.gradle.daemon=true

Every Release

  1. Update the VERSION_NAME in android/gradle.properties.

  2. In the android folder run ./gradlew uploadArchive.

  3. In the android folder run ./gradlew closeAndReleaseRepository.

In case of problems in the last step go to the Sonatype webpage. Look for the staging library. It should be at the end of the list. Select it, and press "Close" button. Once it's closed select it an press "Release". Make sure to drop stale repositories so that the automatic release works in subsequent tries.

Docker Hub

We need to release a new prebuilt Docker image every time our dependencies change. To build the docker image run docker build . in the root folder. Use docker push to upload to Docker Hub.