This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support building as chrome extension (#23)
## Changes - Changed `/web` files to support the wallet as an extension. - Add to README how to build as an extension. - Add CI that builds as an extension. ## Checklist - [x] My code follows the style of this project. - [x] The code compiles without warnings. - [x] I have performed a self-review of the changes. - [x] I have documented my code, in particular the intent of the hard-to-understand areas. - [ ] (If necessary) I have updated the CHANGELOG.
- Loading branch information
1 parent
63dc618
commit 5eb10c7
Showing
4 changed files
with
65 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build and release | ||
|
||
on: | ||
push: | ||
# Pattern matched against refs/tags | ||
tags: | ||
- '*' # Push events to every tag not containing / | ||
|
||
# Allows us to run the workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
flutter_version: 3.13.6 | ||
|
||
jobs: | ||
chrome-extension-build-and-upload: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.flutter_version }} | ||
channel: 'stable' | ||
cache: true | ||
- name: Download pub dependencies | ||
run: flutter pub get | ||
- name: Build Extension | ||
run: flutter build web --web-renderer html --csp --release | ||
- name: Get package version | ||
id: package_version | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq .version pubspec.yaml | ||
- name: Upload Bundle | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: concordium-wallet-web-${{ steps.package_version.outputs.result }} | ||
# We package everything except the canvaskit, which we don't use | ||
path: | | ||
${{github.workspace}}/build/web/ | ||
!${{github.workspace}}/build/web/canvaskit/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,12 @@ | ||
{ | ||
"name": "concordium_wallet", | ||
"short_name": "concordium_wallet", | ||
"start_url": ".", | ||
"display": "standalone", | ||
"background_color": "#0175C2", | ||
"theme_color": "#0175C2", | ||
"description": "A new Flutter project.", | ||
"orientation": "portrait-primary", | ||
"prefer_related_applications": false, | ||
"icons": [ | ||
{ | ||
"src": "icons/Icon-192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "icons/Icon-512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "icons/Icon-maskable-192.png", | ||
"sizes": "192x192", | ||
"type": "image/png", | ||
"purpose": "maskable" | ||
}, | ||
{ | ||
"src": "icons/Icon-maskable-512.png", | ||
"sizes": "512x512", | ||
"type": "image/png", | ||
"purpose": "maskable" | ||
} | ||
] | ||
"version": "1.0.0", | ||
"content_security_policy": { | ||
"extension_pages": "script-src 'self' ; object-src 'self'" | ||
}, | ||
"action": { | ||
"default_popup": "index.html", | ||
"default_icon": "icons/Icon-192.png" | ||
}, | ||
"manifest_version": 3 | ||
} |