docs: ✏️ 增加安卓演示demo下载二维码

This commit is contained in:
xuqingkai 2024-08-29 15:15:47 +08:00
parent 90e86def95
commit 8680e776e2
7 changed files with 102 additions and 4 deletions

84
.github/workflows/deploy-android.yml vendored Normal file
View File

@ -0,0 +1,84 @@
name: Sync to APP BASE
on:
push:
branches:
- release
jobs:
deploy-and-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0 # 确保获取完整的提交历史
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v4
name: Install pnpm
- name: Install dependencies
run: pnpm install
- name: Build Site
run: pnpm build:app-android
- name: Extract version from package.json
run: |
echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
echo "CODE=$(git rev-list --count HEAD)" >> $GITHUB_ENV
echo "APPID=${{ secrets.UNI_APPID }}" >> $GITHUB_ENV
- name: Update manifest.json with id, version, and commit count
run: |
id=${{ secrets.UNI_APPID }}
version=$(jq -r '.version' package.json)
commit_count=$(git rev-list --count HEAD)
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
cat dist/build/app/manifest.json
- name: Print manifest.json
run: cat dist/build/app/manifest.json
- name: Package artifact
uses: actions/upload-artifact@v2
with:
name: app-artifact
path: dist/build/app
- name: Checkout app-base
uses: actions/checkout@v4
with:
repository: Moonofweisheng/uniapp-android-base
token: ${{ secrets.PAT }}
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: app-artifact
path: dist/build/app
- name: Clear and prepare app directory
run: |
cd app/src/main/assets/apps
rm -rf *
mkdir -p "${{ secrets.UNI_APPID }}/www"
- name: Copy build artifacts to app-base
run: |
cp -r dist/build/app/* "app/src/main/assets/apps/${{ secrets.UNI_APPID }}/www"
- name: Commit and push changes
run: |
git config --global user.email "Moonofweisheng"
git config --global user.name "1780903673@qq.com"
version=$(echo "$VERSION") # 从环境变量中获取version
git add .
git commit -m "sync appid$APPID v$version code$CODE"
git push

View File

@ -66,6 +66,8 @@
<img src="https://wot-design-uni.pages.dev/wx.jpg" width="200" height="200"/>
<img src="https://wot-design-uni.pages.dev/alipay.png" width="200" height="200" />
<img src="https://wot-design-uni.pages.dev/h5.png" width="200" height="200" />
<img src="https://wot-design-uni.pages.dev/android.png" width="200" height="200" />
</p>
## 快速上手

View File

@ -23,6 +23,11 @@
<img style="width: 150px; height: 150px;" :src="H5Qrcode" />
<div style="text-align: center;">浏览器扫码</div>
</div>
<div style="display: inline-block;">
<img style="width: 150px; height: 150px;" :src="AndroidQrcode" />
<div style="text-align: center;">浏览器扫码</div>
</div>
</div>
## ✨ 特性
@ -74,6 +79,7 @@
import WxQrcode from '/wx.jpg'
import AlipayQrcode from '/alipay.png'
import H5Qrcode from '/h5.png'
import AndroidQrcode from '/android.png'
export default {
@ -81,7 +87,8 @@ export default {
return {
WxQrcode,
AlipayQrcode,
H5Qrcode
H5Qrcode,
AndroidQrcode
}
}
}

BIN
docs/public/android.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,7 +1,7 @@
{
"name" : "",
"appid" : "",
"description" : "",
"name" : "Wot组件库",
"appid" : "__UNI__14C7B3C",
"description" : "Wot Design Uni 组件库",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
@ -45,6 +45,9 @@
"ios" : {},
/* SDK */
"sdkConfigs" : {}
},
"compatible": {
"ignoreVersion": true
}
},
/* */

View File

@ -68,6 +68,8 @@
<img src="https://wot-design-uni.pages.dev/wx.jpg" width="200" height="200"/>
<img src="https://wot-design-uni.pages.dev/alipay.png" width="200" height="200" />
<img src="https://wot-design-uni.pages.dev/h5.png" width="200" height="200" />
<img src="https://wot-design-uni.pages.dev/android.png" width="200" height="200" />
</p>
## 快速上手