-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix: added release dev for shinkai-visor
- Loading branch information
1 parent
bc39554
commit f75a3ad
Showing
4 changed files
with
84 additions
and
6 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,49 @@ | ||
name: Release dev | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use nx set shas | ||
uses: nrwl/nx-set-shas@v3 | ||
|
||
- name: Setup Node version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
check-latest: false | ||
registry-url: https://registry.npmjs.org | ||
cache: "npm" | ||
cache-dependency-path: package-lock.json | ||
|
||
- name: Install dependencies | ||
run: | | ||
npm cache verify | ||
npm ci --no-audit --prefer-offline | ||
- name: Run NX build on shinkai-visor | ||
run: npx nx build shinkai-visor --skip-nx-cache --verbose | ||
env: | ||
VERSION: 0.0.0.${{github.run_number}} | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: shinkai-visor | ||
path: dist/apps/shinkai-visor | ||
if-no-files-found: error | ||
retention-days: 5 |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineManifest } from '@crxjs/vite-plugin' | ||
|
||
import baseManifestJson from './public/manifest.json'; | ||
|
||
|
||
const getVersion = () => { | ||
const version = process.env.VERSION || baseManifestJson.version || '0.0.0.0'; | ||
const [major, minor, patch, label = '0'] = version | ||
.replace(/[^\d.-]+/g, '') | ||
.split(/[.-]/); | ||
return `${major}.${minor}.${patch}.${label}`; | ||
}; | ||
|
||
export const dynamicManifest = defineManifest((env) => { | ||
return { | ||
...baseManifestJson, | ||
version: getVersion(), | ||
}; | ||
}); |
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