mirror of
https://github.com/HugoAura/Seewo-HugoAura.git
synced 2026-06-20 23:14:28 +08:00
## [✨ Feat] Add ASAR patch locally (main-project) (#45) * [CI/CD] Delete the patchment of the ASAR on workflow & Change the ZIP packing dir to the whole「src」 * [🔄 Chore / 🛠️ Fix] Rename the workflow name & Fixed the path errors * [🛠️ Fix] Fixed the path error of「aura.zip」 * [🔄Chore] Separate aura.zip and core.zip * [🛠️Fix] Fixed the path of zip files.
90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
name: Pack source code & Create CI/CD Release
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 5 * * *'
|
|
push:
|
|
branches: [dev, stable]
|
|
pull_request:
|
|
branches: [dev, stable, main, master]
|
|
workflow_dispatch:
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
pack:
|
|
name: Pack
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: "./HugoAura-Code"
|
|
|
|
- name: Create aura.zip
|
|
run: |
|
|
echo "[DEBUG] Creating artifacts directory"
|
|
mkdir -p Artifacts
|
|
cd ./HugoAura-Code/src/aura
|
|
zip -r ../../../Artifacts/aura.zip .
|
|
cd ../core
|
|
zip -r ../../../Artifacts/core.zip .
|
|
cd ../../..
|
|
|
|
echo "[DEBUG] Files in <Working DIR>/Artifacts directory:"
|
|
ls -la Artifacts/
|
|
|
|
- name: Get commit hash & build time
|
|
run: |
|
|
cd ./HugoAura-Code
|
|
SHORT_HASH=$(git rev-parse --short=7 HEAD)
|
|
FULL_HASH=$(git rev-parse HEAD)
|
|
echo "SHORT_HASH=$SHORT_HASH" >> $GITHUB_ENV
|
|
echo "FULL_HASH=$FULL_HASH" >> $GITHUB_ENV
|
|
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
|
|
|
- name: Create release content
|
|
run: |
|
|
cat > rel_msg.txt << 'EOF'
|
|
## 这是 HugoAura 的 CI 自动构建版本
|
|
|
|
### 版本类型: 🔁 自动构建版
|
|
|
|
### 版本号: `vAutoBuild-${{ env.SHORT_HASH }}`
|
|
|
|
### 对应 Commit: [`${{ env.SHORT_HASH }}`](https://github.com/HugoAura/Seewo-HugoAura/commit/${{ env.FULL_HASH }})
|
|
|
|
---
|
|
|
|
### ⚠ 注意: CI 自动构建版本可能不稳定 / 存在较多 Bug, 更新时请留意
|
|
|
|
#### 🕘 构建时间: ${{ env.BUILDTIME }}
|
|
EOF
|
|
|
|
- name: Upload aura.zip
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aura-code
|
|
path: Artifacts/aura.zip
|
|
|
|
- name: Upload core.zip
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aura-core
|
|
path: Artifacts/core.zip
|
|
|
|
- name: Upload release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: vAutoBuild
|
|
name: "[CI] HugoAura Auto Build Release"
|
|
body_path: rel_msg.txt
|
|
prerelease: true
|
|
generate_release_notes: false
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
files: |
|
|
Artifacts/aura.zip
|
|
Artifacts/core.zip
|