Skip to content

Commit

Permalink
devop: setup workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
admin authored and admin committed Aug 17, 2022
1 parent ac9dac0 commit feb531d
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 10 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/macos-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: MacOS Safari Deploy

on: [push]

jobs:
deploy:
name: Deploying to Testflight
runs-on: macOS-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Deploy iOS Beta to TestFlight via Fastlane
uses: maierj/[email protected]
with:
lane: "buildandrelease"
subdirectory: "macos/Enkrypt"
env:
APPLE_ID: "${{ secrets.OSX_APPLE_ID }}"
APP_ID: "${{ secrets.OSX_APP_ID }}"
FASTLANE_USER: "${{ secrets.OSX_APPLE_ID }}"
FASTLANE_ITC_TEAM_ID: "${{ secrets.OSX_FASTLANE_ITC_TEAM_ID }}"
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: "${{ secrets.OSX_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}"
ITC_TEAM_ID: "${{ secrets.OSX_FASTLANE_ITC_TEAM_ID }}"
INSTALLER_CERT: "${{ secrets.OSX_INSTALLER_CERT }}"
SAFARI_PROVISION: "${{ secrets.OSX_SAFARI_PROVISION }}"
EXTENSION_PROVISION: "${{ secrets.OSX_EXTENSION_PROVISION }}"
MATCH_GIT_URL: "${{ secrets.OSX_MATCH_GIT_URL }}"
MATCH_PASSWORD: "${{ secrets.OSX_MATCH_PASSWORD }}"
GIT_AUTHORIZATION: "${{ secrets.OSX_GIT_AUTHORIZATION }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ typings/
# dotenv environment variables file
.env
.env.test
.env.sh

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down
2 changes: 0 additions & 2 deletions packages/extension/.browserlistrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
last 2 versions
not dead
not safari > 0
not ios_saf > 0
not baidu > 0
not ie > 0
not op_mini all
Expand Down
6 changes: 5 additions & 1 deletion packages/extension/configs/browser-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const browserNames = {
chrome: "chrome",
firefox: "firefox",
opera: "opera",
safari: "safari",
};

const browserConfigs = {
Expand All @@ -20,6 +21,9 @@ const browserConfigs = {
[browserNames.opera]: {
manifest: "./src/manifest/manifest-opera.json",
},
[browserNames.safari]: {
manifest: "./src/manifest/manifest-safari.json",
},
};
function modifyManifest(buffer) {
const manifest = { ...baseManifest, ...JSON.parse(buffer.toString()) };
Expand All @@ -33,7 +37,7 @@ const scripts = {
};

const setConfig = (config) => {
for (let [name, path] of Object.entries(scripts)) {
for (const [name, path] of Object.entries(scripts)) {
config.entry(name).add(path).end();
}
const userScripts = Object.keys(scripts);
Expand Down
1 change: 1 addition & 0 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build:chrome": "cross-env BROWSER='chrome' vue-cli-service build && yarn build:rollup",
"build:firefox": "cross-env BROWSER='firefox' vue-cli-service build && yarn build:rollup",
"build:opera": "cross-env BROWSER='opera' vue-cli-service build && yarn build:rollup",
"build:safari": "cross-env BROWSER='safari' vue-cli-service build && yarn build:rollup",
"build": "yarn build:chrome",
"lint": "vue-cli-service lint --fix",
"build:rollup": "cross-env minify=on rollup --config configs/rollup.config.contentscript.js && cross-env minify=on rollup --config configs/rollup.config.inject.js",
Expand Down
29 changes: 29 additions & 0 deletions packages/extension/src/manifest/manifest-safari.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Enkrypt: Ethereum & Polkadot Web3 Wallet",
"manifest_version": 3,
"action": {
"default_icon": {
"16": "assets/img/icons/icon16.png",
"32": "assets/img/icons/icon32.png",
"64": "assets/img/icons/icon64.png",
"192": "assets/img/icons/icon192.png"
},
"default_title": "Enkrypt",
"default_popup": "action.html"
},
"background": {
"service_worker": "scripts/background.js"
},
"web_accessible_resources": [
{
"resources": ["scripts/inject.js", "scripts/*.js.map"],
"use_dynamic_url": false,
"matches": ["http://*/*", "https://*/*"]
}
],
"minimum_chrome_version": "95",
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
"permissions": ["storage", "unlimitedStorage", "tabs", "clipboardWrite"]
}
14 changes: 7 additions & 7 deletions packages/extension/src/ui/action/styles/theme.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@import "./color.less";

* {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
-webkit-touch-callout: default;
-webkit-user-select: default;
-khtml-user-select: default;
-moz-user-select: default;
-ms-user-select: default;
user-select: default;
}

1 comment on commit feb531d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.