Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit 97612a7

Browse files
Create build.yml
1 parent da39c54 commit 97612a7

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Binary Distribution Daily
2+
3+
on:
4+
schedule:
5+
- cron: '0 4 * * *' # 每天北京时间时间中午12点
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-file:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# 检出代码仓库
14+
- name: Check out the repository
15+
uses: actions/checkout@v3
16+
17+
# 设置 Python 环境
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: 3.x
22+
23+
# 安装所需的依赖
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
# 运行你的 Python 脚本
30+
- name: Start Building Via Nuitka
31+
run: |
32+
python -m nuitka --standalone --onefile --enable-plugin=pyqt5 --include-package=PyQt5 --include-package=PyQt5.QtSvg --include-package=PyQt5.QtCore --include-package=PyQt5.QtGui --include-package=PyQt5.QtWidgets --windows-icon-from-ico=./Plain_Craft_Launcher_2/Images/icon.ico --output-dir=dist --windows-console-mode=disable --follow-imports --remove-output --assume-yes-for-downloads --show-progress --show-memory --include-data-dir=./Plain_Craft_Launcher_2/Images=Images --include-module=_ctypes ./Plain_Craft_Launcher_2/Application.py
33+
34+
# 配置 Git 推送
35+
- name: Commit and push changes
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub 内置的 Token
38+
run: |
39+
git config --global user.name "github-actions[bot]"
40+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
41+
git add Custom.xaml
42+
git commit -m "Update Custom.xaml with new Wiki content"
43+
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/CreeperIsASpy/WikiHomepage-PCL.git HEAD:main

0 commit comments

Comments
 (0)