mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-06 03:38:24 +00:00
commit9163bd479aAuthor: minibits-cash <support@minibits.cash> Date: Fri Dec 8 22:04:52 2023 +0100 Improve lnurl address handling commita8a7840f70Author: minibits-cash <support@minibits.cash> Date: Fri Dec 8 22:00:11 2023 +0100 Improve lnurl address handling commit7f32a15e57Author: minibits-cash <support@minibits.cash> Date: Thu Dec 7 21:48:22 2023 +0100 Beta.4 release for alpha testers commit1c44c15ccdAuthor: minibits-cash <support@minibits.cash> Date: Thu Dec 7 19:37:54 2023 +0100 Upgrade deps commit2c9ab1b71cAuthor: minibits-cash <support@minibits.cash> Date: Thu Dec 7 11:13:43 2023 +0100 Reset cached mints on seed creation commit5fd9e95d2aAuthor: minibits-cash <support@minibits.cash> Date: Wed Dec 6 00:59:09 2023 +0100 Patch cashu-ts error handling commit436c670e7eAuthor: minibits-cash <support@minibits.cash> Date: Wed Dec 6 00:52:09 2023 +0100 Clean unused deps commitf6174bc607Author: minibits-cash <support@minibits.cash> Date: Wed Dec 6 00:51:45 2023 +0100 Remove debug commit868506a14cAuthor: minibits-cash <support@minibits.cash> Date: Wed Dec 6 00:50:33 2023 +0100 Improve receive error handling commite1bf087565Author: minibits-cash <support@minibits.cash> Date: Tue Dec 5 23:06:36 2023 +0100 Final small UX tuning commit875218d648Author: minibits-cash <support@minibits.cash> Date: Tue Dec 5 16:14:34 2023 +0100 Fix QR code error message commitc37b3e5ffeAuthor: minibits-cash <support@minibits.cash> Date: Tue Dec 5 12:53:23 2023 +0100 New beta release v0.1.5 - Off-device seed backup commit95811817faAuthor: minibits-cash <support@minibits.cash> Date: Tue Dec 5 09:35:21 2023 +0100 Align cashu-ts patch commitf61ad99e64Author: minibits-cash <support@minibits.cash> Date: Mon Dec 4 18:46:41 2023 +0100 Recovery - final tweaks commit6fa384c8efAuthor: minibits-cash <support@minibits.cash> Date: Mon Dec 4 00:10:32 2023 +0100 Fix counters in restore. commit50e9887405Author: minibits-cash <support@minibits.cash> Date: Sat Dec 2 23:53:37 2023 +0100 Seed recovery for testing commit00605c49afAuthor: minibits-cash <support@minibits.cash> Date: Tue Nov 28 00:57:08 2023 +0100 SeedRecovery before first tests commitaaefbe0e63Author: minibits-cash <support@minibits.cash> Date: Thu Nov 23 11:46:08 2023 +0100 Recovery screen - wip commitc019f63f48Author: minibits-cash <support@minibits.cash> Date: Mon Nov 20 00:44:35 2023 +0100 Remote backup screen with seed phrase commitada2f36070Author: minibits-cash <support@minibits.cash> Date: Sun Nov 19 22:03:06 2023 +0100 Generate seed
147 lines
6.1 KiB
YAML
147 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 - TEMP SKIP CHECK
|
|
- 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=true" >> $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='PROD' >> .env
|
|
echo SENTRY_DSN='${{ secrets.SENTRY_DSN }}' >> .env
|
|
echo CODEPUSH_PRODUCTION_DEPLOYMENT_KEY='${{ secrets.CODEPUSH_PRODUCTION_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' >> .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 Production --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
|
|
});
|
|
|