mirror of
https://github.com/rememberber/MooTool.git
synced 2026-09-21 13:51:38 +08:00
GitHub Actions CI 自动打包
This commit is contained in:
@@ -22,21 +22,25 @@ jobs:
|
||||
target: mac-x64
|
||||
profile: mac-intel
|
||||
artifact_dir: target/mac-intel
|
||||
release_label: mac-intel
|
||||
- name: macOS Apple Silicon
|
||||
runner: macos-14
|
||||
target: mac-arm64
|
||||
profile: mac-apple-silicon
|
||||
artifact_dir: target/mac-apple-silicon
|
||||
release_label: mac-apple-silicon
|
||||
- name: Windows x64
|
||||
runner: windows-latest
|
||||
target: windows-x64
|
||||
profile: windows-x64
|
||||
artifact_dir: target/windows-x64
|
||||
release_label: windows-x64
|
||||
- name: Linux x64
|
||||
runner: ubuntu-latest
|
||||
target: linux-x64
|
||||
profile: linux-x64
|
||||
artifact_dir: target/linux-x64
|
||||
release_label: linux-x64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -68,12 +72,19 @@ jobs:
|
||||
- name: Build installer
|
||||
run: mvn --batch-mode --no-transfer-progress clean package -P${{ matrix.profile }} -Dmaven.test.skip=true
|
||||
|
||||
- name: Stage release assets
|
||||
run: >-
|
||||
python scripts/collect_release_assets.py
|
||||
--source-dir ${{ matrix.artifact_dir }}
|
||||
--output-dir dist/${{ matrix.profile }}
|
||||
--target-label ${{ matrix.release_label }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.profile }}
|
||||
path: |
|
||||
${{ matrix.artifact_dir }}
|
||||
dist/${{ matrix.profile }}
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
||||
@@ -101,5 +112,9 @@ jobs:
|
||||
release-assets/**/*.zip
|
||||
release-assets/**/*.tar.gz
|
||||
release-assets/**/*.deb
|
||||
release-assets/**/*.rpm
|
||||
release-assets/**/*.msi
|
||||
release-assets/**/*.exe
|
||||
release-assets/**/*.jar
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ target/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
dist/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
@@ -382,5 +382,6 @@ mvn clean package -Plinux-x64 -Dmaven.test.skip=true
|
||||
- `windows-latest`:`windows-x64`
|
||||
- `ubuntu-latest`:`linux-x64`
|
||||
- 使用 `actions/cache` 缓存 `downloads/jdks/` 和 `jdks/`
|
||||
- 每个 job 会上传各自平台的安装包产物
|
||||
- 每个 job 会把产物重命名为统一格式后再上传,例如:`MooTool-1.7.0-mac-intel.dmg`、`MooTool-1.7.0-windows-x64.zip`
|
||||
- Actions Summary 会列出“原始文件名 -> Release 文件名”的对照表,方便核对每个平台实际产物
|
||||
- 推送 `v*` 标签时,会自动创建或更新对应 GitHub Release,并上传构建出的安装包附件
|
||||
|
||||
Reference in New Issue
Block a user