Skip to content

Commit

Permalink
ci: add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ljzd-PRO committed May 2, 2024
1 parent c85e38b commit e139c86
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/actions/pyinstaller/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Package using PyInstaller
description: Bundles a Python application and all its dependencies into a single package.

inputs:
spec-path:
description: Path of Spec file
required: false
default: "zipls.spec"

dist-path:
description: Path of Spec file
required: false
default: "dist"

runs:
using: "composite"
steps:
- name: Install Pyinstaller
run: pip install pyinstaller
shell: bash

- name: Create Executable
run: pyinstaller ${{ inputs.spec-path }} --distpath ${{ inputs.dist-path }}
shell: bash

- name: Copy Extra Files
run: cp README.md LICENSE dist
shell: bash
59 changes: 59 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Python Package

on:
workflow_dispatch:
workflow_call:
push:
pull_request:

jobs:
# build-wheels:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup Python environment
# uses: actions/setup-python@v5
# with:
# python-version: "3.11"
# cache: 'pip'
#
# - name: Install Requirements
# run: pip install -r requirements.txt
#
# - name: Build package with Poetry
# run: poetry build
#
# - name: Upload Wheels
# uses: actions/upload-artifact@v4
# with:
# name: ktoolbox-wheels
# path: dist

create-executable:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]

steps:
- uses: actions/checkout@v4

- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'

- name: Install Requirements
run: pip install -r requirements.txt

- name: Create Executable
uses: ./.github/actions/pyinstaller

- name: Upload Executable
uses: actions/upload-artifact@v4
with:
name: zipls-${{ runner.os }}-amd64
path: dist

0 comments on commit e139c86

Please sign in to comment.