diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml new file mode 100644 index 0000000..c2dd5a3 --- /dev/null +++ b/.github/workflows/python-release.yml @@ -0,0 +1,128 @@ +name: 流媒体服务 + +on: + push: + tags: + - StreamClientV* + +jobs: + release: + name: ${{ matrix.os }} 创建Release + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ "ubuntu-latest" ] #, "macos-latest", "windows-latest" + steps: + - name: 克隆代码 + uses: actions/checkout@v3 + - name: 创建发行版本 + continue-on-error: true + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body_path: README.md + draft: false + prerelease: false + Windows: + name: 打包发布-操作系统版本:(${{ matrix.os }},Python版本:${{ matrix.python-version }}) + runs-on: ${{ matrix.os }} + permissions: + contents: read + security-events: write + pull-requests: write + strategy: + fail-fast: false + matrix: + os: ["windows-latest"] + python-version: ["3.8"] + steps: + - name: 下载代码 + uses: actions/checkout@v3 + with: + repository: jadehh/StreamClient + ref: StreamClient + path: code + token: ${{ secrets.GH_PAT }} + - name: 准备Python环境 + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: pip升级 + shell: pwsh + run: | + python -m pip install --upgrade pip + - name: 准备打包环境 + shell: pwsh + run: | + pip install -r code/requirements.txt + + - name: Windows操作系统安装Inno Setup 下载 + if: runner.os == 'Windows' + uses: actions/checkout@v3 + with: + repository: jadehh/InnoSetup + path: InnoSetup + - name: 编译打包 + env: + PYTHONIOENCODING: "utf-8" + shell: pwsh + run: | + cd code + python packing.py + + # 发布 + - name: 发布 + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: + "./code/Output/*" + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限 + Ubuntu: + name: 打包发布-操作系统版本:(${{ matrix.os }}) + runs-on: ${{ matrix.os }} + container: + image: jadehh/container_ocr:amd64-packing-1.0.2 + options: --privileged + strategy: + fail-fast: false + matrix: + os: [ "ubuntu-latest" ] # "ubuntu-18.04", "windows-latest","macos-latest" + steps: + - name: 下载代码 + uses: actions/checkout@v3 + with: + repository: jadehh/StreamClient + ref: StreamClient + path: code + token: ${{ secrets.GH_PAT }} + - name: 准备打包环境 + run: | + pip install -r code/requirements.txt + apt-get install -y wget + apt-get install -y libgl1-mesa-glx + apt-get install -y libfuse2 + apt-get install -y libsm6 libxrender1 libfontconfig1 + wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage + mv appimagetool-x86_64.AppImage ~/ + chmod a+x ~/appimagetool-x86_64.AppImage + - name: 编译打包 + run: | + cd code + python packing.py + # 发布 + - name: 发布 + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: + "./code/Output/*" + env: + GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限 \ No newline at end of file diff --git a/README.md b/README.md index 8a40a2b..2872e71 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ -# jadehh_file -文件托管 +# StreamClient +## StreamClientV1.1.0 - 2024-06-21 05:10:49 +StreamClientV1.1.0 +* [发布地址](https://github.com/jadehh/StreamClient/releases/tag/V1.1.0) +* [详细地址](https://github.com/jadehh/jadehh_file/releases/tag/StreamClientV1.1.0) +### 下载地址 +* [StreamClient_setup-V1.1-0.exe](https://gh.ddlc.top/https://github.com/jadehh/jadehh_file/releases/download/StreamClientV1.1.0/StreamClient_setup-V1.1-0.exe) +* [StreamClient-Linux-V1.1-0.zip](https://gh.ddlc.top/https://github.com/jadehh/jadehh_file/releases/download/StreamClientV1.1.0/StreamClient-Linux-V1.1-0.zip) +---- \ No newline at end of file