Skip to content

Commit 8680e77

Browse files
author
xuqingkai
committed
docs: ✏️ 增加安卓演示demo下载二维码
1 parent 90e86de commit 8680e77

File tree

7 files changed

+102
-4
lines changed

7 files changed

+102
-4
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Sync to APP BASE
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
deploy-and-sync:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout 🛎️
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # 确保获取完整的提交历史
17+
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
24+
- uses: pnpm/action-setup@v4
25+
name: Install pnpm
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Build Site
31+
run: pnpm build:app-android
32+
33+
- name: Extract version from package.json
34+
run: |
35+
echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
36+
echo "CODE=$(git rev-list --count HEAD)" >> $GITHUB_ENV
37+
echo "APPID=${{ secrets.UNI_APPID }}" >> $GITHUB_ENV
38+
39+
- name: Update manifest.json with id, version, and commit count
40+
run: |
41+
id=${{ secrets.UNI_APPID }}
42+
version=$(jq -r '.version' package.json)
43+
commit_count=$(git rev-list --count HEAD)
44+
jq --arg id "$id" --arg version "$version" --arg commit_count "$commit_count" '.id = $id | .appid = $id | .version.name = $version | .version.code = $commit_count' dist/build/app/manifest.json > tmp_manifest.json && mv tmp_manifest.json dist/build/app/manifest.json
45+
46+
cat dist/build/app/manifest.json
47+
- name: Print manifest.json
48+
run: cat dist/build/app/manifest.json
49+
- name: Package artifact
50+
uses: actions/upload-artifact@v2
51+
with:
52+
name: app-artifact
53+
path: dist/build/app
54+
55+
- name: Checkout app-base
56+
uses: actions/checkout@v4
57+
with:
58+
repository: Moonofweisheng/uniapp-android-base
59+
token: ${{ secrets.PAT }}
60+
61+
- name: Download artifact
62+
uses: actions/download-artifact@v2
63+
with:
64+
name: app-artifact
65+
path: dist/build/app
66+
67+
- name: Clear and prepare app directory
68+
run: |
69+
cd app/src/main/assets/apps
70+
rm -rf *
71+
mkdir -p "${{ secrets.UNI_APPID }}/www"
72+
73+
- name: Copy build artifacts to app-base
74+
run: |
75+
cp -r dist/build/app/* "app/src/main/assets/apps/${{ secrets.UNI_APPID }}/www"
76+
77+
- name: Commit and push changes
78+
run: |
79+
git config --global user.email "Moonofweisheng"
80+
git config --global user.name "1780903673@qq.com"
81+
version=$(echo "$VERSION") # 从环境变量中获取version
82+
git add .
83+
git commit -m "sync appid$APPID v$version code$CODE"
84+
git push

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
<img src="https://wot-design-uni.pages.dev/wx.jpg" width="200" height="200"/>
6767
<img src="https://wot-design-uni.pages.dev/alipay.png" width="200" height="200" />
6868
<img src="https://wot-design-uni.pages.dev/h5.png" width="200" height="200" />
69+
<img src="https://wot-design-uni.pages.dev/android.png" width="200" height="200" />
70+
6971
</p>
7072

7173
## 快速上手

docs/guide/introduction.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<img style="width: 150px; height: 150px;" :src="H5Qrcode" />
2424
<div style="text-align: center;">浏览器扫码</div>
2525
</div>
26+
27+
<div style="display: inline-block;">
28+
<img style="width: 150px; height: 150px;" :src="AndroidQrcode" />
29+
<div style="text-align: center;">浏览器扫码</div>
30+
</div>
2631
</div>
2732

2833
## ✨ 特性
@@ -74,14 +79,16 @@
7479
import WxQrcode from '/wx.jpg'
7580
import AlipayQrcode from '/alipay.png'
7681
import H5Qrcode from '/h5.png'
82+
import AndroidQrcode from '/android.png'
7783

7884

7985
export default {
8086
data () {
8187
return {
8288
WxQrcode,
8389
AlipayQrcode,
84-
H5Qrcode
90+
H5Qrcode,
91+
AndroidQrcode
8592
}
8693
}
8794
}

docs/public/android.png

42.1 KB
Loading

docs/public/h5.png

-3.2 KB
Loading

src/manifest.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name" : "",
3-
"appid" : "",
4-
"description" : "",
2+
"name" : "Wot组件库",
3+
"appid" : "__UNI__14C7B3C",
4+
"description" : "Wot Design Uni 组件库",
55
"versionName" : "1.0.0",
66
"versionCode" : "100",
77
"transformPx" : false,
@@ -45,6 +45,9 @@
4545
"ios" : {},
4646
/* SDK配置 */
4747
"sdkConfigs" : {}
48+
},
49+
"compatible": {
50+
"ignoreVersion": true
4851
}
4952
},
5053
/* 快应用特有相关 */

src/uni_modules/wot-design-uni/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
<img src="https://wot-design-uni.pages.dev/wx.jpg" width="200" height="200"/>
6969
<img src="https://wot-design-uni.pages.dev/alipay.png" width="200" height="200" />
7070
<img src="https://wot-design-uni.pages.dev/h5.png" width="200" height="200" />
71+
<img src="https://wot-design-uni.pages.dev/android.png" width="200" height="200" />
72+
7173
</p>
7274

7375
## 快速上手

0 commit comments

Comments
 (0)