Skip to content

release

release #11

Workflow file for this run

# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: release
# Trigger the workflow when:
on:
# A push occurs to one of the matched tags.
push:
tags:
# Pattern that roughly matches Oasis Core's version tags.
# For more details on GitHub Actions' pattern match syntax, see:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags.
- 'v[0-9]+.[0-9]+*'
# Disable secrets.GITHUB_TOKEN permissions.
permissions: {}
jobs:
release:
# NOTE: This name appears in GitHub's Checks API.
name: prepare-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up OpenJDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build web ROSE Wallet
run: yarn build
- name: Build extension ROSE Wallet
run: yarn build:ext
- name: Sync Capacitor for Android
run: yarn cap sync android
- name: Accept SDK licenses
run: yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses
# Capacitor v6 sets a deployment target of Android 14 (SDK 34)
- name: Install SDK components
run: |
"$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" "platform-tools" "platforms;android-34" "build-tools;34.0.0"
- name: Build Android ROSE Wallet
run: ./gradlew bundleRelease
working-directory: android
- name: Decode and Save Keystore File
run: |
echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > android/release.jks
- name: Sign Android bundle
run: |
jarsigner -verbose -keystore "android/release.jks" -storepass "${{ secrets.KEYSTORE_PASSWORD }}" -keypass "${{ secrets.KEYSTORE_PASSWORD }}" -signedjar "android/app/build/outputs/bundle/release/app-release-signed.aab" "android/app/build/outputs/bundle/release/app-release.aab" "${{ secrets.KEY_ALIAS }}"
- name: Set workflow variables
# Id is needed to access output in a next step.
id: vars
env:
# There's no support for escaping this for use in a shell command.
# GitHub's recommendation is to pass it through the environment.
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
REF_NAME: ${{ github.ref_name }}
# We want to show version without the leading 'v'
# and use short SHA of the commit for file name.
run: |
echo "VERSION=$(echo "$REF_NAME" | sed 's/^v//')" >> "$GITHUB_OUTPUT"
- name: Copy and rename Android bundle
env:
# Need to escape again
VERSION: ${{ steps.vars.outputs.VERSION }}
run: |
cp "android/app/build/outputs/bundle/release/app-release-signed.aab" "rose-wallet-android-$VERSION.aab"
- name: Create web ROSE Wallet zip file
env:
VERSION: ${{ steps.vars.outputs.VERSION }}
run: |
cd build/
zip -r "../rose-wallet-web-$VERSION.zip" .
- name: Create extension ROSE Wallet zip file
env:
VERSION: ${{ steps.vars.outputs.VERSION }}
run: |
cd build-ext/
zip -r "../rose-wallet-ext-mv3.zip" .
- name: Parse CHANGELOG.md file and extract changes for the given version
uses: buberdds/extract-changelog-action@v1
id: changelog
with:
version: ${{ steps.vars.outputs.VERSION }}
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
rose-wallet-ext-mv3.zip
name: ROSE Wallet MV3 Extension beta
body: |
To install beta version as a separate extension:
- open **chrome://extensions/**
- click top right to enable Developer mode
- download **rose-wallet-ext-mv3.zip** (assets below)
- drag it into chrome://extensions/
To copy saved wallets from old extension:
- _extensions and instructions like these could be malicious and steal your tokens - don't blindly trust them_
- open **chrome-extension://ppdadbejkmjnefldpcdjhnkpbjkikoip/manifest.json** and open console and run:
```js
if (location.href !== 'chrome-extension://ppdadbejkmjnefldpcdjhnkpbjkikoip/manifest.json') throw 'Is this the new extension instead of old one?';
copy(`
if ((await new Promise(resolve => chrome.storage.local.get('keyringData', resolve))).keyringData) throw 'Already has keyringData. Is this old extension instead of new one?';
const chromeStorageLocal = ${JSON.stringify(await new Promise(resolve => chrome.storage.local.get(null, resolve)))};
await new Promise(resolve => chrome.storage.local.set(chromeStorageLocal, resolve));
Object.entries(${JSON.stringify(window.localStorage)}).forEach(([k, v]) => window.localStorage.setItem(k, v));
chrome.extension.getBackgroundPage().location.reload();
location.reload();
`)
```
- **chrome-extension://jeooipjboldjebnajiegnfpklodgimmf/manifest.json** open console and paste.
- click the new extension
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}