Skip to content

Commit 7aee3f6

Browse files
committed
update ci
1 parent 304ce47 commit 7aee3f6

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

.github/workflows/build-linux.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: Build-Windows
2-
1+
name: Build-Linux
32

43
on:
54
push:
@@ -10,7 +9,7 @@ on:
109
jobs:
1110
# Build job
1211
build:
13-
runs-on: windows-latest
12+
runs-on: ubuntu-latest
1413
steps:
1514
- name: Checkout
1615
uses: actions/checkout@v4
@@ -34,6 +33,6 @@ jobs:
3433
- name: Build api
3534
run: npm run api
3635
- name: Build cli
37-
run: npm run cli:build:win
36+
run: npm run cli:build:linux
3837
- name: Build APP
39-
run: npm run build:win
38+
run: npm run build:linux

.github/workflows/release.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release-Windows
1+
name: Release
22

33
on:
44
push:
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
# Build job
12-
build:
12+
build-windows:
1313
runs-on: windows-latest
1414
permissions: write-all
1515
steps:
@@ -93,3 +93,59 @@ jobs:
9393
ALIYUN_ACCESS_KEY_ID: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
9494
ALIYUN_ACCESS_KEY_SECRET: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
9595
run: node tools/upload.js --note --app
96+
97+
build-linux:
98+
needs: build-windows
99+
runs-on: ubuntu-latest
100+
permissions: write-all
101+
steps:
102+
- name: Checkout
103+
uses: actions/checkout@v4
104+
with:
105+
fetch-depth: 0
106+
- name: Set Version
107+
id: version
108+
shell: bash
109+
run: |
110+
version=${GITHUB_REF_NAME#v}
111+
echo "VERSION=$version" >> $GITHUB_ENV
112+
- name: Setup Node
113+
uses: actions/setup-node@v4
114+
with:
115+
node-version: 20
116+
cache: npm
117+
- name: Install dependencies
118+
run: npm install
119+
- name: Build with VitePress
120+
run: npm run docs:build
121+
- name: Build docan
122+
run: npm run docan
123+
- name: Build dolin
124+
run: npm run dolin
125+
- name: Build worker
126+
run: npm run worker
127+
- name: Build api
128+
run: npm run api
129+
- name: Build cli
130+
run: npm run cli:build:linux
131+
- name: Build APP
132+
run: npm run build:linux
133+
- name: Upload CLI
134+
uses: actions/upload-release-asset@v1
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137+
with:
138+
upload_url: ${{ steps.create_release.outputs.upload_url }}
139+
asset_path: ./resources/bin/ecb_cli
140+
asset_name: ecb_cli
141+
asset_content_type: application/octet-stream
142+
143+
- name: Upload DEB
144+
uses: actions/upload-release-asset@v1
145+
env:
146+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147+
with:
148+
upload_url: ${{ steps.create_release.outputs.upload_url }}
149+
asset_path: ./dist/ecubus-pro_${{ env.VERSION }}_amd64.deb
150+
asset_name: ecubuspro_${{ env.VERSION }}_amd64.deb
151+
asset_content_type: application/vnd.debian.binary-package

0 commit comments

Comments
 (0)