Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload binary executable, users no need to install python #142

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/publish-bin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Bin Executable

on:
push:
tags:
- 'v*'

jobs:
deploy-bin:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
# - macos-latest
- macos-13 # for python 3.7
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Install dependencies
run: |
pip install pyinstaller
pip install .
- name: Build executable
shell: bash
run: |
echo -e "from idf_build_apps.main import main\nif __name__ == '__main__':\n main()\n" > idf-build-apps.py
export IDF_PATH=$(pwd)
export VERSION=$(pip list | grep idf-build-apps | awk '{print $2}')
export OS=$(echo ${{ matrix.os }} | sed 's/-.*//')
pyinstaller -F idf-build-apps.py -n "idf-build-apps-${OS}-${VERSION}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: idf-build-apps-${{ matrix.os }}
path: dist/*
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*'

jobs:
deploy:
deploy-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ MANIFEST
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
idf-build-apps.py

# Installer logs
pip-log.txt
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -16,14 +16,14 @@ repos:
- license_header.txt # defaults to: LICENSE.txt
- --use-current-year
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.2.1'
rev: 'v0.5.4'
hooks:
- id: ruff
args: ['--fix', '--preview']
- id: ruff-format
args: ['--preview']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
rev: 'v1.11.0'
hooks:
- id: mypy
args: ['--warn-unused-ignores']
Expand Down
Loading