Skip to content

Commit 4180c07

Browse files
committed
feat: 添加自动构建脚本
1 parent 99e05df commit 4180c07

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build-and-release:
12+
name: Build Project and Create Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/[email protected]
20+
21+
- name: Node
22+
uses: actions/[email protected]
23+
with:
24+
node-version: "20.19.6"
25+
26+
- name: Install
27+
run: npm install
28+
29+
- name: Build Server
30+
run: npm run build:server
31+
32+
- name: Get version
33+
id: read_version
34+
run: |
35+
VERSION=$(jq -r '.version' package.json)
36+
echo "version=$VERSION" >> $GITHUB_OUTPUT
37+
38+
- name: Update version in manifest file
39+
run: |
40+
sed -i "s/version=1.0.0/version=${{ steps.read_version.outputs.version }}/" app/manifest
41+
42+
- name: Build Package
43+
run: |
44+
chmod +x ./build/fnpack-1.0.4-linux-amd64
45+
./build/fnpack-1.0.4-linux-amd64 build app
46+
47+
- name: Release
48+
uses: ncipollo/[email protected]
49+
with:
50+
tag: v${{ steps.read_version.outputs.version}}
51+
name: v${{ steps.read_version.outputs.version}}
52+
body: |
53+
[更新日志](https://github.com/FNOSP/App.Bin.CodeEditor/blob/main/CHANGELOG.md)
54+
artifacts: "code.editor.fpk"
55+
token: ${{ secrets.GITHUB_TOKEN }}

app/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
appname=code.editor
2-
version=1.3.1
2+
version=1.0.0
33
desc=`<div>VS Code 同源库,支持多种编码文件的操作,更有语法高亮、代码补全。</div>
44
<div>text、txt、js、ts、html、htm、css、scss、less、json、md、py、java、c、cpp、cc、cxx、go、rs、php、rb、sh、sql、xml、yaml、yml、vue 后缀文件直接双击文件或右键选择代码编辑器打开。</div><div>非上述后缀文件,右键【详细信息】-【复制原始路径】,点击桌面图标访问后粘贴路径打开。</div>
55
<div>提示:编辑用户目录中的文件需【系统设置】-【应用】-【代码编辑器】进行文件夹授权,应用文件夹中目录下可直接编辑;</div><div>提示:移动端暂未做 UI 适配,访问可能布局错乱;访问二进制文件将显示乱码,请谨慎操作。</div>`

build/fnpack-1.0.4-linux-amd64

3.58 MB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "code.editor",
3+
"version": "1.3.1",
34
"scripts": {
45
"dev": "node src/app.js",
56
"install": "npm i --prefix=backend && npm i --prefix=frontend",

0 commit comments

Comments
 (0)