diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100755 index 0000000..de38ba9 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,18 @@ +name: Build & release +on: + push: + tags: [v**] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Package Application + uses: JackMcKew/pyinstaller-action-windows@main + with: + path: src + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: src/dist/windows/1cv8_postgres_helper.exe diff --git a/.gitignore b/.gitignore index dc20fd0..22ad483 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest -*.spec # Installer logs pip-log.txt diff --git a/README.md b/README.md index 4538eba..812876c 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,18 @@ ## Показать встроенную справку -```sh -python 1cv8_postgres_helper.py --help +```powershell +1cv8_postgres_helper.exe --help ``` ## Наиболее простой вариант -```sh -python 1cv8_postgres_helper.py --config postgresql.example.conf --mem 32GB +```powershell +1cv8_postgres_helper.exe --config postgresql.example.conf --mem 32GB ``` ## Все доступные аргументы -```sh -python 1cv8_postgres_helper.py --config postgresql.example.conf --mem 32GB --cpu 8 --storage ssd --disable-synchronous-commit --enable-group-commit --no-backup +```powershell +1cv8_postgres_helper.exe --config postgresql.example.conf --mem 32GB --cpu 8 --storage ssd --disable-synchronous-commit --enable-group-commit --no-backup ``` diff --git a/src/build.spec b/src/build.spec new file mode 100644 index 0000000..16c7913 --- /dev/null +++ b/src/build.spec @@ -0,0 +1,20 @@ +a = Analysis(['main.py'], + hiddenimports=[], + hookspath=None, + runtime_hooks=None, + ) +pyz = PYZ(a.pure) + +options = [('u', None, 'OPTION')] + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + options, + name='1cv8_postgres_helper', + debug=False, + strip=None, + upx=True, + ) diff --git a/1cv8_postgres_helper.py b/src/main.py similarity index 100% rename from 1cv8_postgres_helper.py rename to src/main.py