Skip to content

* 更新算法配置界面V2.0.8.3 #498

* 更新算法配置界面V2.0.8.3

* 更新算法配置界面V2.0.8.3 #498

Workflow file for this run

name: 算法前端配置界面发布
on:
push:
tags:
- AlgorithmConfiureV*
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
other:
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"] # "ubuntu-18.04", "windows-latest
os: ["windows-latest","macos-latest"] # "ubuntu-18.04", "windows-latest","macos-latest"
python-version: ["3.6"]
steps:
- name: 下载代码
uses: actions/checkout@v3
with:
repository: jadehh/AlgorithmConfigUI
ref: AlgorithmConfiure
path: code
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
- name: Windows操作系统安装Inno Setup 下载
if: runner.os == 'Windows'
uses: actions/checkout@v3
with:
repository: jadehh/InnoSetup
path: InnoSetup
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
- name: Windows 准备Python X86 环境
if: runner.os == 'Windows'
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x86
- name: 其他操作系统准备Python X64环境
if: runner.os != 'Windows'
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: Windows操作系统准备打包环境
if: runner.os == 'Windows'
shell: pwsh
run: |
pip install pywin32
pip install -r code/requirements.txt
- name: macOS操作系统准备打包环境
if: runner.os == 'macOS'
shell: pwsh
run: |
pip install -r code/requirements.txt
- name: Linux操作系统准备打包环境
if: runner.os == 'Linux'
shell: pwsh
run: |
pip install -r code/requirements.txt
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
sudo apt-get install libfuse2
- name: 编译打包
env:
PYTHONIOENCODING: "utf-8"
shell: pwsh
run: |
cd code
python packing.py # --specify_files samplesMain.py
- name: 测试是否打包完成
shell: pwsh
run: |
cd code/Output
ls
# 发布
- 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/AlgorithmConfigUI
ref: AlgorithmConfiure
path: code
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your 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
pip install opencv-python==4.2.0.34
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 # --specify_files samplesMain.py
- name: 测试是否打包完成
run: |
cd code/Output
ls
# 发布
- name: 发布
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files:
"./code/Output/*"
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # 给最高的权限