Skip to content

Commit

Permalink
Add 支持CI自动发布
Browse files Browse the repository at this point in the history
  • Loading branch information
Misaka-1314 committed Nov 30, 2024
1 parent ac2ac66 commit 8c157b3
Show file tree
Hide file tree
Showing 939 changed files with 47,943 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/origin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 构建并上传小程序代码

on:
workflow_call:
secrets:
APPID:
required: true
KEY:
required: true

jobs:
upload:
runs-on: ubuntu-latest

steps:
- name: 检出代码
uses: actions/checkout@v4
with:
repository: misaka-org/Chaoxing-MiniProgram

- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: 写入私钥
run: |
cd miniprogram
echo "${{ secrets.KEY }}" > ./private.${{ secrets.APPID }}.key
- name: 安装依赖
run: |
cd miniprogram
npm install --omit=dev --no-audit
npm install -g miniprogram-ci
- name: 执行小程序编译上传
run: |
cd miniprogram
miniprogram-ci upload --pp ./ --pkp ./private.${{ secrets.APPID }}.key --appid ${{ secrets.APPID }} --enable-es6 true -r 30
15 changes: 15 additions & 0 deletions .github/workflows/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 执行上传任务

on:
push:
branches:
- main
workflow_dispatch:

jobs:
call_workflow:
uses: misaka-org/Chaoxing-MiniProgram/.github/workflows/origin.yaml@main
secrets:
APPID: ${{ secrets.APPID }}
KEY: ${{ secrets.KEY }}

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
miniprogram_npm
data
log
tmp
Expand Down
16 changes: 16 additions & 0 deletions miniprogram/miniprogram_npm/no-data/no-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Component({
properties: {
text: {
type: String,
value: '暂无数据',
},
desc: {
type: String,
value: '',
},
},
lifetimes: {
attached() { },
},
methods: {}
})
3 changes: 3 additions & 0 deletions miniprogram/miniprogram_npm/no-data/no-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"component": true
}
5 changes: 5 additions & 0 deletions miniprogram/miniprogram_npm/no-data/no-data.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<view class="no-data">
<image class="no-data" src="/static/svg/illustration/no-data.svg" mode="aspectFit"></image>
<text class="no-data">{{text}}</text>
<text class="no-data" wx:if="{{desc}}">{{desc}}</text>
</view>
18 changes: 18 additions & 0 deletions miniprogram/miniprogram_npm/no-data/no-data.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
view.no-data {
width: 100%;
text-align: center;
margin-top: calc(50vh - 300rpx);
color: gray;
}

image.no-data {
display: block;
width: 160rpx;
height: 160rpx;
margin: 20rpx auto;
}

text.no-data {
font-size: 26rpx;
display: block;
}
Loading

0 comments on commit 8c157b3

Please sign in to comment.