Skip to content

Commit

Permalink
Merge pull request #1 from zeerayne/build-exe
Browse files Browse the repository at this point in the history
Add github action: build exe and publish release when tag is added
  • Loading branch information
zeerayne authored Mar 24, 2024
2 parents b227501 + abbea4b commit 2e8863c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
20 changes: 20 additions & 0 deletions src/build.spec
Original file line number Diff line number Diff line change
@@ -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,
)
File renamed without changes.

0 comments on commit 2e8863c

Please sign in to comment.