nostrband / nostr-universe

Explore the Nostr apps safely!
https://spring.site
MIT License
55 stars 7 forks source link

Automated build workflows #157

Closed atrifat closed 11 months ago

atrifat commented 11 months ago

Description

This PR will solve issue #71 by adding Automated Github Action Release Script. The following script will build android release apk and aab files, sign them using maintainer keystore, and make release draft (pre-release) which can be updated later. The process will ensure the build process will be transparent and more reproducible to other users/developers. This process is similar to how Amethyst release script been executed by tagging release with semantic versioning.

Maintainer (@nostrband ) only need to add 4 secrets needed by Github Actions after merging the PR:

KEY_ALIAS <- <alias_name>
KEY_PASSWORD <- <your password>
KEY_STORE_PASSWORD <- <your key store password>
SIGNING_KEY <- the data from <my-release-key.keystore>

and tag the release version:

git tag v0.12.1

A working example is available on release draft here produced by the following action script.

Additional steps related to keystore creation were also attached in description below. Thank you.

atrifat commented 11 months ago

Additional Steps to Create Keystore for Release

Following steps were mostly adapted from Amethyst Readme

Generate new keystore (we can skip this if we have already existing keystore)

keytool -genkey -v -keystore my-release-key.keystore -alias <alias_name> -keyalg RSA -keysize 2048 -validity 10000

Save keystore as base64 string

openssl base64 < my-release-key.keystore | tr -d '\n' | tee some_signing_key.jks.base64.txt

Create four Secret Key variables on our GitHub repository and fill in the signing key information

KEY_ALIAS <- <alias_name>
KEY_PASSWORD <- <your password>
KEY_STORE_PASSWORD <- <your key store password>
SIGNING_KEY <- the data from <my-release-key.keystore>