updated readme #13
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: 发布眼迹AI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出仓库 | |
uses: actions/checkout@v2 | |
- name: 设置Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: 创建和激活Python虚拟环境 | |
run: python3 -m venv venv && source venv/bin/activate | |
- name: 安装系统依赖项 | |
run: | | |
sudo apt update | |
sudo apt install -y pkg-config libssl-dev libffi-dev | |
- name: 安装依赖项 | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install numpy opencv-python aiohttp==3.8.1 cchardet==2.1.7 | |
pip3 install -r requirements.txt | |
- name: 构建二进制文件 | |
run: pyinstaller --onefile run.py | |
- name: 读取Changelog | |
id: read_changelog | |
run: echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_ENV && cat CHANGELOG.md >> $GITHUB_ENV && echo "EOF" >> $GITHUB_ENV | |
- name: 创建发布 | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: Release ${{ github.run_number }} | |
body: ${{ env.CHANGELOG_CONTENT }} | |
draft: false | |
prerelease: false |