-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac2ac66
commit 1faffe9
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 pack-npm --pp ./ --pkp ./private.${{ secrets.APPID }}.key --appid ${{ secrets.APPID }} | ||
miniprogram-ci upload --pp ./ --pkp ./private.${{ secrets.APPID }}.key --appid ${{ secrets.APPID }} --enable-es6 true -r 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"tdesign-miniprogram": "^1.8.1", | ||
"miniprogram-ci": "^2.0.10" | ||
} | ||
} |