Skip to content

Commit

Permalink
Merge branch 'refactor/develop' into feat/editor-shortcut-save
Browse files Browse the repository at this point in the history
  • Loading branch information
yy-wow committed Feb 18, 2025
2 parents 1893fa9 + ab58e88 commit 0215bc7
Show file tree
Hide file tree
Showing 620 changed files with 13,152 additions and 8,777 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
if: github.repository == 'opentiny/tiny-engine'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Run Build
run: pnpm run build:plugin && pnpm run build:alpha > /tmp/build-alpha.log 2>&1

- name: Upload build logs
uses: actions/upload-artifact@v4
with:
name: build-alpha-log
path: /tmp/build-alpha.log

- name: Parse Publish tag
id: parse_tag
run: |
tag_name="${GITHUB_REF#refs/tags/}"
if [[ "$tag_name" == *alpha* ]]; then
echo "dist_tag=alpha" >> "$GITHUB_OUTPUT"
elif [[ "$tag_name" == *beta* ]]; then
echo "dist_tag=beta" >> "$GITHUB_OUTPUT"
elif [[ "$tag_name" == *rc* ]]; then
echo "dist_tag=rc" >> "$GITHUB_OUTPUT"
else
echo "dist_tag=latest" >> "$GITHUB_OUTPUT"
fi
- name: Verify clean working directory
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Working directory is not clean"
exit 1
fi
- name: Verify package version match tag
run: |
tag_name="${GITHUB_REF#refs/tags/}"
package_version=$(pnpm lerna list --scope=@opentiny/tiny-engine --json | jq -r '.[0].version')
if [[ "$tag_name" != "v$package_version" ]]; then
echo "Tag name $tag_name does not match package version $package_version"
exit 1
fi
- name: Publish package to npm
run: pnpm lerna publish from-package --dist-tag ${{steps.parse_tag.outputs.dist_tag}} --yes
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60 changes: 30 additions & 30 deletions .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@ on:
push:
branches: []
pull_request:
branches: [develop,main, refactor/develop]
branches: [develop, main, refactor/develop, release/*]

jobs:
push-check:
runs-on: ubuntu-latest # windows-latest || macos-latest
runs-on: ubuntu-latest # windows-latest || macos-latest

steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: pnpm i
- name: Install dependencies
run: pnpm i

- name: Get changed files
id: get_changed_files
uses: tj-actions/changed-files@v41
with:
files: |
**.js
**.vue
**.jsx
- name: Run ESLint
run: npx eslint ${{steps.get_changed_files.outputs.all_changed_files}}
- name: Run Build
run: pnpm run build:plugin && pnpm run build:alpha > build-alpha.log 2>&1
- name: Get changed files
id: get_changed_files
uses: tj-actions/changed-files@v41
with:
files: |
**.js
**.vue
**.jsx
- name: Run ESLint
run: npx eslint ${{steps.get_changed_files.outputs.all_changed_files}}
- name: Run Build
run: pnpm run build:plugin && pnpm run build:alpha > build-alpha.log 2>&1

- name: Upload build logs
uses: actions/upload-artifact@v4
with:
name: build-alpha-log
path: build-alpha.log
- name: Upload build logs
uses: actions/upload-artifact@v4
with:
name: build-alpha-log
path: build-alpha.log
12 changes: 7 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
semi: false
singleQuote: true
printWidth: 120
trailingComma: 'none'
endOfLine: 'auto'
{
"semi": false,
"singleQuote": true,
"printWidth": 120,
"trailingComma": "none",
"endOfLine": "auto"
}
2 changes: 1 addition & 1 deletion designer-demo/engine.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
id: 'engine.config',
theme: import.meta.env.VITE_THEME || 'light',
theme: 'light',
material: ['/mock/bundle.json'],
scripts: [],
styles: []
Expand Down
22 changes: 10 additions & 12 deletions designer-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
{
"name": "designer-demo",
"private": true,
"version": "2.0.0",
"version": "2.2.0",
"type": "module",
"scripts": {
"dev": "cross-env VITE_THEME=light vite",
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build"
"dev": "cross-env vite",
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build"
},
"dependencies": {
"@opentiny/tiny-engine": "workspace:^",
"@opentiny/tiny-engine-theme-dark": "workspace:*",
"@opentiny/tiny-engine-theme-light": "workspace:*",
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/vue": "~3.14.0",
"@opentiny/vue-design-smb": "~3.14.0",
"@opentiny/vue-icon": "~3.14.0",
"@opentiny/vue-locale": "~3.14.0",
"@opentiny/vue-renderless": "~3.14.0",
"@opentiny/vue-theme": "~3.14.0",
"@opentiny/vue": "~3.20.0",
"@opentiny/vue-design-smb": "~3.20.0",
"@opentiny/vue-icon": "~3.20.0",
"@opentiny/vue-locale": "~3.20.0",
"@opentiny/vue-renderless": "~3.20.0",
"@opentiny/vue-theme": "~3.20.0",
"@vueuse/core": "^9.6.0",
"vue": "^3.4.21"
},
Expand Down
Loading

0 comments on commit 0215bc7

Please sign in to comment.