Skip to content

Commit

Permalink
Merge pull request #208 from taojy123/github_actions
Browse files Browse the repository at this point in the history
Release:5.1.1
  • Loading branch information
Monomux authored Feb 10, 2023
2 parents 1448998 + 1bc3388 commit b952e4e
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 3 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: release

on:
pull_request:
branches: [ "master" ]

permissions:
contents: read

env:
keymousego-version: _v5_1_1

jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@main
with:
python-version: "3.7"
- name: Install dependencies
run: |
pip3 install -r requirements-windows.txt
pip3 install pyinstaller
- name: Bundle Packages
run: |
pyinstaller -Fw --add-data './assets;assets' KeymouseGo.py
- name: Copy artifact
run: |
mkdir artifact && mv dist/KeymouseGo.exe ./artifact/KeymouseGo${{ env.keymousego-version }}-win.exe
- name: Artifact
uses: actions/upload-artifact@main
with:
name: windows
path: ${{ github.workspace }}/artifact/

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@main
with:
python-version: "3.7"
- name: Install dependencies
run: |
pip3 install -r requirements-universal.txt
pip3 install pyinstaller
- name: Bundle Packages
run: |
pyinstaller -Fw --add-data './assets:assets' KeymouseGo.py
- name: Copy artifact
run: |
mkdir artifact && mv dist/KeymouseGo ./artifact/KeymouseGo${{ env.keymousego-version }}-linux
- name: Artifact
uses: actions/upload-artifact@main
with:
name: linux
path: ${{ github.workspace }}/artifact/

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.7
uses: actions/setup-python@main
with:
python-version: "3.7"
- name: Install dependencies
run: |
pip3 install -r requirements-universal.txt
pip3 install pyinstaller
- name: Bundle Packages
run: |
pyinstaller -Fw --add-data './assets:assets' KeymouseGo.py
- name: Copy artifact
run: |
mkdir artifact && mv dist/KeymouseGo ./artifact/KeymouseGo${{ env.keymousego-version }}-mac
- name: Artifact
uses: actions/upload-artifact@main
with:
name: macos
path: ${{ github.workspace }}/artifact/
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ scripts/

# Custom configue file
*.ini
.github
plugins/
logs/
!assets/
5 changes: 3 additions & 2 deletions UIFunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
'Middle']

logger.remove()
logger.add(sys.stdout, backtrace=True, diagnose=True,
level='DEBUG')
if sys.stdout is not None:
logger.add(sys.stdout, backtrace=True, diagnose=True,
level='DEBUG')
logger.add(to_abs_path('logs', '{time}.log'), rotation='20MB', backtrace=True, diagnose=True,
level='INFO')

Expand Down

0 comments on commit b952e4e

Please sign in to comment.