Get Unity Releases #353
This file contains hidden or 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
| name: Get Unity Releases | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '00 12 * * *' # 每天中午12点执行 | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-releases-json: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v4 | |
| - name: 设置Python环境 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: 安装依赖 | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests brotlicffi | |
| - name: 运行Unity版本获取脚本 | |
| run: | | |
| python UnityReleases.py | |
| - name: 显示生成的文件 | |
| run: | | |
| ls -la *.json | |
| - name: 发布Unity版本JSON文件 | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| LTS.json | |
| BETA.json | |
| ALPHA.json | |
| TECH.json | |
| SUPPORTED.json | |
| tag_name: releases |