feat: chrome extension workflow
This commit is contained in:
parent
d8c9e8e386
commit
cdaa541531
|
|
@ -0,0 +1,32 @@
|
|||
name: Publish Extension
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
submit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Zip extensions
|
||||
run: FRONTEND_URL=https://platform.postiz.com pnpm run build:extension
|
||||
|
||||
- name: Publish to Chrome Web Store
|
||||
uses: mnao305/chrome-extension-upload@v5.0.0
|
||||
with:
|
||||
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
|
||||
client-id: ${{ secrets.CHROME_CLIENT_ID }}
|
||||
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
|
||||
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
|
||||
file-path: apps/extension/extension.zip
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Postiz",
|
||||
"description": "Grow faster on socials",
|
||||
"description": "Your ultimate social media scheduling tool",
|
||||
"options_ui": {
|
||||
"page": "src/pages/options/index.html"
|
||||
},
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
"icons": {
|
||||
"128": "icon-128.png"
|
||||
},
|
||||
"permissions": ["activeTab", "cookies", "tabs", "storage"],
|
||||
"permissions": ["activeTab"],
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["http://*/*", "https://*/*", "<all_urls>"],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "postiz-extension",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "A simple chrome & firefox extension template with Vite, React, TypeScript and Tailwind CSS.",
|
||||
"scripts": {
|
||||
"build": "rm -rf dist && vite build --config vite.config.chrome.ts && zip -r extension.zip dist",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ const Comp: FC<{ removeModal: () => void; platform: string, style: string }> = (
|
|||
iframe.style.backgroundColor = 'transparent';
|
||||
// @ts-ignore
|
||||
iframe.allowTransparency = 'true';
|
||||
iframe.src = import.meta.env.FRONTEND_URL + `/modal/${props.style}/${props.platform}`;
|
||||
iframe.src = (import.meta.env?.FRONTEND_URL || process?.env?.FRONTEND_URL) + `/modal/${props.style}/${props.platform}`;
|
||||
iframe.id = 'modal-postiz';
|
||||
iframe.style.width = '100%';
|
||||
iframe.style.height = '100%';
|
||||
|
|
|
|||
Loading…
Reference in New Issue