Skip to content

Commit

Permalink
- fix: added CICD for Chrome Store (#56)
Browse files Browse the repository at this point in the history
* - feature: added cicd for chrome

* - test: enabled chrome deployments

* - fix: name and description env

* - fix: disabled autopublish while extension pass their first review

* - fix: removed test branches

* - fix: skip when fail chrome upload
  • Loading branch information
agallardol authored Oct 27, 2023
1 parent a0f9630 commit dc618ef
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 4 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release dev

on:
push:
branches: [ main, agallardol/mobile-build ]
branches: [ main ]

defaults:
run:
Expand Down Expand Up @@ -40,6 +40,22 @@ jobs:
run: npx nx build shinkai-visor --skip-nx-cache --verbose
env:
VERSION: 0.0.0.${{github.run_number}}
NAME_PREFIX: '[Dev] '
DESCRIPTION_PREFIX: 'This is for development purpose.\n\n'

- name: Zip extension
run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor

- name: Upload & Release
uses: mnao305/[email protected]
continue-on-error: true
with:
file-path: dist/apps/shinkai-visor.zip
extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: true

- uses: actions/upload-artifact@v3
with:
Expand Down
12 changes: 11 additions & 1 deletion apps/shinkai-visor/dynamic-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,26 @@ import baseManifestJson from './public/manifest.json';


const getVersion = () => {
const version = process.env.VERSION || baseManifestJson.version || '0.0.0.0';
const version = process.env.VERSION || baseManifestJson.version || '0.0.0.1';
const [major, minor, patch, label = '0'] = version
.replace(/[^\d.-]+/g, '')
.split(/[.-]/);
return `${major}.${minor}.${patch}.${label}`;
};

const getName = () => {
return `${process.env.NAME_PREFIX || ''}${baseManifestJson.name}`;
}

const getDescription = () => {
return `${process.env.DESCRIPTION_PREFIX || ''}${baseManifestJson.description}`;
}

export const dynamicManifest = defineManifest((env) => {
return {
...baseManifestJson,
version: getVersion(),
name: getName(),
description: getDescription(),
};
});
Binary file modified apps/shinkai-visor/public/icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/shinkai-visor/public/icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/shinkai-visor/public/icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions apps/shinkai-visor/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"description": "Transforms your web browser into a first class Shinkai client.",
"manifest_version": 3,
"update_url": "https://clients2.google.com/service/update2/crx",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm5XZIjmISeYdECai228Nz5DKO7nA3MN5FWwsg5kImRjAZcWbNBG4ywJhwo7UjUErljng5wrerJATFhcxlXYfkSGR6gfV3sk4j+twm0PxlQXge8w0e24S55j6lk2vNHA3AwfnI8/wl3kI1CqWK6YqtSL7lDWw5inVvz3JH9w4fvXPlQpBkU52BDEE6dQQ3npscdh05/aBmOiHGev+Q1D5NCbh7TJQaXDE30ApS4u6bwr1rQrSXjc2Hcy/8yiLvAmzLNOG6fAGMUIUdrMweqgmgKxKF1+v4i+fkNy4jZF2rLMZRqKzLrDF7Ov60TYt+hFC+IriOUVzemg7h4QQR+51ZQIDAQAB",
"version": "0.4.2",
"version": "0.0.0.1",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
Expand Down

0 comments on commit dc618ef

Please sign in to comment.