build-linux-arm-appimage.yml 968 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: CI 自动构建linux arm electron 包,并保存结果
  2. on:
  3. push:
  4. branches:
  5. - master
  6. repository_dispatch:
  7. types:
  8. - webhook_trigger
  9. jobs:
  10. build:
  11. runs-on: self-hosted
  12. steps:
  13. - name: 检出代码
  14. uses: actions/checkout@v4
  15. - name: 设置 Node.js 环境
  16. uses: actions/setup-node@v4
  17. with:
  18. node-version: '20'
  19. - name: 安装依赖
  20. run: npm install --force
  21. - name: 运行自定义构建脚本
  22. env:
  23. GH_TOKEN: ${{ secrets.GH_TOKEN }} # 关键:把 secret 映射成环境变量
  24. run: node .build/h5_for_electron.build.linux.arm.js
  25. - name: 切换 Node.js 18 环境
  26. uses: actions/setup-node@v4
  27. with:
  28. node-version: '18'
  29. - name: 构建 PKG
  30. run: npm run pkg
  31. - name: 上传构建结果
  32. uses: actions/upload-artifact@v4
  33. with:
  34. name: build-output
  35. path: ./dist