-
Notifications
You must be signed in to change notification settings - Fork 45
78 lines (74 loc) · 3.36 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# 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 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 extension
run: yarn build:ext
- name: Set workflow variables
# Id is needed to access output in a next step.
id: vars
# We want to show version without the leading 'v'
# and use short SHA of the commit for file name.
run: |
echo "VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')" >> "$GITHUB_OUTPUT"
- name: Create zip file
run: |
cd build-ext/
zip -r ../rose-wallet-extension-beta.zip .
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
rose-wallet-extension-beta.zip
name: ROSE Wallet Extension - beta
body: |
To install beta version as a separate extension:
- open **chrome://extensions/**
- click top right to enable Developer mode
- download **rose-wallet-extension-beta.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 }}