社区每日支持邮箱 #218
Workflow file for this run
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: Push REPO | |
| on: | |
| push: | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| PYTHONIOENCODING: 'UTF-8' | |
| strategy: | |
| matrix: | |
| python-version: [ 3.12.6 ] | |
| steps: | |
| - name: Configure git | |
| run: | | |
| [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
| git config --global core.autocrlf false | |
| git config --global core.eol lf | |
| git config --global user.email "ok-oldking@users.noreply.github.com" | |
| git config --global user.name "ok-oldking" | |
| echo "action_state=yellow" >> $env:GITHUB_ENV | |
| echo "${{ env.action_state }}" | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set UTF-8 encoding | |
| run: | | |
| set PYTHONIOENCODING=utf-8 | |
| set PYTHONLEGACYWINDOWSSTDIO=utf-8 | |
| echo PYTHONIOENCODING=utf-8 >> $GITHUB_ENV | |
| - name: Get Changes between Tags | |
| id: changes | |
| uses: simbo/changes-between-tags-action@v1 | |
| with: | |
| validate-tag: false | |
| - name: Get tag name | |
| id: tagName | |
| uses: olegtarasov/get-tag@v2.1.3 | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| pip install cython setuptools | |
| - name: inline_ok_requirements | |
| run: | | |
| python -m ok.update.inline_ok_requirements --tag ${{ steps.tagName.outputs.tag }} | |
| - name: Run tests | |
| run: | | |
| Get-ChildItem -Path ".\tests\*.py" | ForEach-Object { | |
| Write-Host "Running tests in $($_.FullName)" | |
| python -m unittest $_.FullName | |
| } | |
| - name: Sync Repositories | |
| id: sync # Give the step an ID to access its outputs | |
| uses: ok-oldking/partial-sync-repo@master # Replace with your action path | |
| with: | |
| repos: | | |
| https://cnb:${{ secrets.CNB_TOKEN }}@cnb.cool/ok-oldking/ok-gf2.git | |
| https://alicejump:${{ secrets.GH_TOKEN }}@github.com/alicejump/ok-gf2-update.git | |
| sync_list: 'deploy.txt' | |
| tag: ${{ github.ref_name }} | |
| gitignore_file: '.update_repo_gitignore' | |
| show_author: true | |
| - name: Build with PyAppify Action | |
| id: build-app | |
| uses: ok-oldking/pyappify-action@master | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| draft: false | |
| body: | | |
| ### 更新日志 ${{ steps.sync.outputs.start_tag }} -> ${{ steps.sync.outputs.end_tag }}: | |
| ${{ steps.sync.outputs.changes_with_asterisk }} | |
| ### 下载包说明 / Download Packages | |
| * [ok-gf2-win32-china-setup.exe](https://github.com/AliceJump/ok-gf2/releases/download/${{ github.ref_name }}/ok-gf2-win32-china-setup.exe) 完整安装包(内含全部依赖,推荐国内用户或网络受限环境)/ Full installer (all dependencies included, recommended for users in China or with limited internet) | |
| * [ok-gf2-win32-global-setup.exe](https://github.com/AliceJump/ok-gf2/releases/download/${{ github.ref_name }}/ok-gf2-win32-global-setup.exe) Github 源完整安装包(适合全球用户,依赖从GitHub下载)/ Github source whole setup (for global users, dependencies from GitHub) | |
| * [ok-gf2-win32-online-setup.exe](https://github.com/AliceJump/ok-gf2/releases/download/${{ github.ref_name }}/ok-gf2-win32-online-setup.exe) 在线安装包(体积小,需联网下载依赖,建议先使用完整安装包)/ Online installer (small size, downloads dependencies online, recommended to use the full installer first) | |
| * 不要下载SourceCode, Do Not Download the SourceCode | |
| ### 如果无法下载可以使用, 其他下载源 / Alternative download sources | |
| * [Mirror酱下载渠道](https://mirrorchyan.com/zh/projects?rid=okgf&source=ok-gf-release), 国内网页直链, 下载需要购买CD-KEY, 已有Mirror酱CD-KEY可免费下载 / Mainland China direct link, requires CD-KEY (free for existing Mirror users) | |
| * [夸克网盘](https://pan.quark.cn/s/a1052cec4d13), 免费 / Free | |
| files: pyappify_dist/* | |
| - name: Trigger MirrorChyanUploading | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: | | |
| gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_uploading | |
| gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |