Skip to content

Commit

Permalink
Add action
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Liu <[email protected]>
  • Loading branch information
andy0808 committed Jul 18, 2023
1 parent cc4d619 commit 9370641
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build


on:
push:
branches:
- main
- 'fix/**'
- 'feature/**'
- 'release/**'
pull_request:
branches:
- main
- 'release/**'
schedule:
- cron: '1 0 * * 4'


jobs:
build:
name: Build on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check action type
run: |
echo "OS: $RUNNER_OS"
echo "Repository: $GITHUB_REPOSITORY"
echo "Commit: $GITHUB_SHA"
echo "Branch: `git rev-parse --abbrev-ref HEAD`"
- name: Prepare Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Prepare requirements
id: prepare-requirements
run: |
echo "Prepare python requirements on $RUNNER_OS"
cd $GITHUB_WORKSPACE
cd ./mm/src
pip3 install -r requirements.txt
- name: Build python project
id: build-project
run: |
cd $GITHUB_WORKSPACE
mkdir exe
cd ./mm/src
pyinstaller ./mm.py
mv dist/mm/* $GITHUB_WORKSPACE/exe
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Binary build on ${{ matrix.os }}
path: |
exe
retention-days: 7
6 changes: 6 additions & 0 deletions mm/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
colorama==0.4.6
pyinstaller==5.13.0
pyinstaller-hooks-contrib==2023.5
pyserial==3.5
toml==0.10.2
tqdm==4.65.0

0 comments on commit 9370641

Please sign in to comment.