Skip to content

Commit e4c99fa

Browse files
committed
Merge branch 'snapshot' into feature
2 parents 979ce91 + 3124b57 commit e4c99fa

File tree

6 files changed

+174
-17
lines changed

6 files changed

+174
-17
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["develop"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout scratch-gui
13+
uses: actions/checkout@v4
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 22
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 9
24+
25+
- name: Install dependencies
26+
run: pnpm install --frozen-lockfile
27+
28+
- name: Generate files
29+
run: npm run prepublish
30+
31+
- name: Build
32+
run: NODE_ENV=production npm run build
33+
34+
- name: Checkout astraeditor.github.io
35+
uses: actions/checkout@v4
36+
with:
37+
repository: AstraEditor/astraeditor.github.io
38+
token: ${{ secrets.DEPLOY_TOKEN }}
39+
path: gh-pages
40+
41+
- name: Deploy to online directory
42+
run: |
43+
cd gh-pages
44+
# 清空 online 目录(保留 .git)
45+
find online -mindepth 1 -delete
46+
# 复制构建产物
47+
cp -r $GITHUB_WORKSPACE/build/* online/
48+
# 提交
49+
git config user.name "github-actions[bot]"
50+
git config user.email "github-actions[bot]@users.noreply.github.com"
51+
git add -A
52+
git diff --quiet && git diff --staged --quiet || \
53+
git commit -m "New Release Version from scratch-gui ${GITHUB_SHA:0:7}"
54+
git push
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,21 @@ jobs:
1515
- name: Install Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: 24
19-
cache: 'npm'
18+
node-version: 22
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 9
2024

2125
- name: Install dependencies
22-
run: npm ci
26+
run: pnpm install --frozen-lockfile
27+
28+
- name: Generate files
29+
run: npm run prepublish
2330

2431
- name: Build
25-
run: npm run build
32+
run: NODE_ENV=production npm run build
2633

2734
- name: Checkout astraeditor.github.io
2835
uses: actions/checkout@v4
@@ -43,5 +50,5 @@ jobs:
4350
git config user.email "github-actions[bot]@users.noreply.github.com"
4451
git add -A
4552
git diff --quiet && git diff --staged --quiet || \
46-
git commit -m "Deploy from scratch-gui ${GITHUB_SHA:0:7}"
47-
git push
53+
git commit -m "A Snapshot Version from scratch-gui ${GITHUB_SHA:0:7}"
54+
git push

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"redux-throttle": "0.1.1",
9595
"scratch-audio": "github:AstraEditor/scratch-audio#develop",
9696
"scratch-blocks": "github:AstraEditor/scratch-blocks#develop-builds",
97+
"scratch-extension-editor": "github:AstraEditor/scratch-extension-editor#main",
9798
"scratch-paint": "github:AstraEditor/scratch-paint#develop",
9899
"scratch-render": "github:AstraEditor/scratch-render#develop",
99100
"scratch-vm": "github:AstraEditor/scratch-vm#master",
@@ -142,6 +143,7 @@
142143
"redux-mock-store": "1.5.3",
143144
"rimraf": "2.7.1",
144145
"selenium-webdriver": "3.6.0",
146+
"terser-webpack-plugin": "^4.2.3",
145147
"uglifyjs-webpack-plugin": "1.3.0",
146148
"url-loader": "4.1.1",
147149
"web-audio-test-api": "0.5.2",
@@ -163,10 +165,5 @@
163165
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",
164166
"editor-msgs(\\.js)?$": "<rootDir>/test/__mocks__/editor-msgs-mock.js"
165167
}
166-
},
167-
"overrides": {
168-
"webpack@4.47.0": {
169-
"terser-webpack-plugin": "^4.2.3"
170-
}
171168
}
172169
}

pnpm-lock.yaml

Lines changed: 88 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/ae-version.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
const version = {
22
version: '1.1.3',
3-
date: '2026-03-05',
4-
webBuild: '0',
3+
date: '2026-03-23',
4+
webBuild: '1',
55
webUpdate: [
6-
'修复启用“手机布局”和“紧凑编辑器”会导致在部分情况下舞台被覆盖的问题',
7-
'修复“角色文件列表视图”(sprite-folders)的右键和导出问题'
6+
'修复Monitor的一系列问题',
7+
'简单调整了UI',
8+
'添加了新的扩展编辑器(仍在测试)',
9+
810
]
911
};
1012
export default version;

webpack.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const base = {
6161
publicPath: root
6262
},
6363
resolve: {
64-
symlinks: false,
64+
symlinks: true,
6565
alias: {
6666
'text-encoding$': path.resolve(__dirname, 'src/lib/tw-text-encoder'),
6767
'scratch-render-fonts$': path.resolve(__dirname, 'src/lib/tw-scratch-render-fonts'),
@@ -186,7 +186,16 @@ module.exports = [
186186
minChunks: 2,
187187
minSize: 50000,
188188
maxInitialRequests: 5
189-
}
189+
},
190+
minimizer: [
191+
new (require('terser-webpack-plugin'))({
192+
terserOptions: {
193+
compress: {
194+
reduce_vars: false
195+
}
196+
}
197+
})
198+
]
190199
},
191200
plugins: base.plugins.concat([
192201
new webpack.DefinePlugin({

0 commit comments

Comments
 (0)