修改GPU模型储存位置, 支持windows中文用户名 #204
Workflow file for this run
This file contains 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: Build Windows Executable | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
name: Build exe with launcher | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
with: | |
fetch-depth: 0 # Important: fetch all history for all tags and branches | |
- 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: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' # Use the version of Python you need | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Executable | |
run: | | |
echo "tag: ${{ steps.changes.outputs.tag }}" | |
echo "changes: ${{ steps.changes.outputs.changes }}" | |
python -m ok.update.package_launcher ${{ steps.tagName.outputs.tag }} | |
python -m ok.update.gen_md5 .\dist | |
mv dist ok-ww | |
7z a -t7z -r "ok-ww-release-${{ steps.tagName.outputs.tag }}.7z" "ok-ww" | |
shell: pwsh | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
下载release.7z文件解压缩运行ok-ww.exe, Download release.7z and extract and execute the ok-ww.exe | |
更新内容: | |
${{ steps.changes.outputs.changes }} | |
draft: false | |
prerelease: true | |
- name: upload-win | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./ok-ww-release-${{ steps.tagName.outputs.tag }}.7z | |
asset_name: ok-ww-release-${{ steps.tagName.outputs.tag }}.7z | |
asset_content_type: application/zip | |