Files
minibits_wallet/.github/workflows/jsCodePush-TEST.yaml
T
minibits-cash 64fee85221 Implement seed recovery:
commit 9163bd479a
Author: minibits-cash <support@minibits.cash>
Date:   Fri Dec 8 22:04:52 2023 +0100

    Improve lnurl address handling

commit a8a7840f70
Author: minibits-cash <support@minibits.cash>
Date:   Fri Dec 8 22:00:11 2023 +0100

    Improve lnurl address handling

commit 7f32a15e57
Author: minibits-cash <support@minibits.cash>
Date:   Thu Dec 7 21:48:22 2023 +0100

    Beta.4 release for alpha testers

commit 1c44c15ccd
Author: minibits-cash <support@minibits.cash>
Date:   Thu Dec 7 19:37:54 2023 +0100

    Upgrade deps

commit 2c9ab1b71c
Author: minibits-cash <support@minibits.cash>
Date:   Thu Dec 7 11:13:43 2023 +0100

    Reset cached mints on seed creation

commit 5fd9e95d2a
Author: minibits-cash <support@minibits.cash>
Date:   Wed Dec 6 00:59:09 2023 +0100

    Patch cashu-ts error handling

commit 436c670e7e
Author: minibits-cash <support@minibits.cash>
Date:   Wed Dec 6 00:52:09 2023 +0100

    Clean unused deps

commit f6174bc607
Author: minibits-cash <support@minibits.cash>
Date:   Wed Dec 6 00:51:45 2023 +0100

    Remove debug

commit 868506a14c
Author: minibits-cash <support@minibits.cash>
Date:   Wed Dec 6 00:50:33 2023 +0100

    Improve receive error handling

commit e1bf087565
Author: minibits-cash <support@minibits.cash>
Date:   Tue Dec 5 23:06:36 2023 +0100

    Final small UX tuning

commit 875218d648
Author: minibits-cash <support@minibits.cash>
Date:   Tue Dec 5 16:14:34 2023 +0100

    Fix QR code error message

commit c37b3e5ffe
Author: minibits-cash <support@minibits.cash>
Date:   Tue Dec 5 12:53:23 2023 +0100

    New beta release v0.1.5 - Off-device seed backup

commit 95811817fa
Author: minibits-cash <support@minibits.cash>
Date:   Tue Dec 5 09:35:21 2023 +0100

    Align cashu-ts patch

commit f61ad99e64
Author: minibits-cash <support@minibits.cash>
Date:   Mon Dec 4 18:46:41 2023 +0100

    Recovery - final tweaks

commit 6fa384c8ef
Author: minibits-cash <support@minibits.cash>
Date:   Mon Dec 4 00:10:32 2023 +0100

    Fix counters in restore.

commit 50e9887405
Author: minibits-cash <support@minibits.cash>
Date:   Sat Dec 2 23:53:37 2023 +0100

    Seed recovery for testing

commit 00605c49af
Author: minibits-cash <support@minibits.cash>
Date:   Tue Nov 28 00:57:08 2023 +0100

    SeedRecovery before first tests

commit aaefbe0e63
Author: minibits-cash <support@minibits.cash>
Date:   Thu Nov 23 11:46:08 2023 +0100

    Recovery screen - wip

commit c019f63f48
Author: minibits-cash <support@minibits.cash>
Date:   Mon Nov 20 00:44:35 2023 +0100

    Remote backup screen with seed phrase

commit ada2f36070
Author: minibits-cash <support@minibits.cash>
Date:   Sun Nov 19 22:03:06 2023 +0100

    Generate seed
2023-12-10 21:48:04 +01:00

148 lines
6.1 KiB
YAML

name: Minibits JS bundle code push
# This workflow is manually triggered. Only if package.json version has changed it creates .env file,
# builds new js bundle and pushes it to devices running app with TEST env and STAGING code push deployment key.
# At the end it creates and pushes new version tag to github.
on: workflow_dispatch
jobs:
deploy-code-push:
runs-on: macos-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
# Fetch javascript bundle version from package.json
- name: Read package.json version and detect changes
id: version-check
uses: salsify/action-detect-and-tag-new-version@v2
with:
create-tag: false
- name: Set versions
run: |-
echo "PREV_JS_VERSION=${{steps.version-check.outputs.previous-version }}" >> $GITHUB_ENV
echo "CURRENT_JS_VERSION=${{steps.version-check.outputs.current-version }}" >> $GITHUB_ENV
# Codepush build will continue only if version changed from previous commit
- name: Detect version change
run: |
if [ "${{ env.PREV_JS_VERSION }}" != "${{ env.CURRENT_JS_VERSION }}" ]; then
echo "IS_VERSION_CHANGED=true" >> $GITHUB_ENV
echo "Detected version change"
else
echo "IS_VERSION_CHANGED=false" >> $GITHUB_ENV
echo "No version change, skipping further processing"
fi
# Fetch native app versionName and versionCode from app/build.gradle
- name: Get Android native version
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
id: version-reader-android
uses: ltDino/android-get-version-action@v1.0
with:
gradlePath: android/app/build.gradle
# Get commit hash
- name: Get commit hash
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
id: commit-hash
uses: pr-mpt/actions-commit-hash@v2
- name: Set commit hash and native version information
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: |-
echo "NATIVE_VERSION=${{steps.version-reader-android.outputs.versionName }}" >> $GITHUB_ENV
echo "COMMIT_HASH=${{steps.commit-hash.outputs.short }}" >> $GITHUB_ENV
# Get commit message
- name: Get last commit message
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const response = await github.rest.repos.getCommit({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.sha
});
const lastCommit = response.data.commit;
const message = lastCommit.message;
console.log(message);
core.exportVariable('COMMIT_MESSAGE', message);
# Create .env file
- name: Generate .env
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: |-
echo APP_ENV='TEST' >> .env
echo SENTRY_DSN='${{ secrets.SENTRY_DSN }}' >> .env
echo CODEPUSH_STAGING_DEPLOYMENT_KEY='${{ secrets.CODEPUSH_STAGING_DEPLOYMENT_KEY }}' >> .env
echo NATIVE_VERSION_ANDROID='${{ env.NATIVE_VERSION }}' >> .env
echo JS_BUNDLE_VERSION='${{ env.CURRENT_JS_VERSION }}' >> .env
echo MINIBITS_SERVER_API_KEY='${{ secrets.MINIBITS_SERVER_API_KEY }}' >> .env
echo MINIBITS_SERVER_API_HOST='https://api.minibits.cash' >> .env
echo MINIBITS_NIP05_DOMAIN='@minibits.cash' >> .env
echo MINIBITS_RELAY_URL='wss://relay.minibits.cash/test' >> .env
echo MINIBITS_MINT_URL='wss://mint.minibits.cash/Bitcoin' >> .env
echo COMMIT='${{ env.COMMIT_HASH }}' >> .env
# Install dependecies from package.json
- name: Install app dependencies
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
uses: bahmutov/npm-install@v1.6.0
- name: Install Sentry CLI
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: npm install @sentry/cli --legacy-peer-deps
# Code push with source maps export for Sentry
- name: Install AppCenter CLI
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: npm install -g appcenter-cli
- name: Deploy to CodePush Android
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: appcenter codepush release-react -a minibits-cash/minibits_wallet_android -d Staging --description '${{ env.COMMIT_MESSAGE }} (v${{ env.CURRENT_JS_VERSION }})' --sourcemap-output ./build/index.android.bundle.map --output-dir ./build
env:
APPCENTER_ACCESS_TOKEN: ${{ secrets.APPCENTER_ACCESS_TOKEN_ANDROID }}
# Upload source files to Sentry
- name: Upload source files to Sentry
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
run: |-
./node_modules/.bin/sentry-cli login --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }}
./node_modules/.bin/sentry-cli releases \
files minibits_wallet_android@${{ env.CURRENT_JS_VERSION }} \
upload-sourcemaps \
--strip-prefix /build \
--dist ${{ env.NATIVE_VERSION }} \
--org ${{ secrets.SENTRY_ORG }} \
--project react-native \
./build/index.android.bundle.map ./build/Codepush/index.android.bundle
# Create the release tag in github repo
- name: Create tag
if: ${{ env.IS_VERSION_CHANGED == 'true' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const tagPrefix = "v";
const tagName = tagPrefix + process.env.CURRENT_JS_VERSION;
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tagName}`,
sha: context.sha
});