Skip to content

Commit

Permalink
Create Github Action for building EXEs (#27) (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliabieri authored Nov 29, 2022
1 parent f611bb2 commit 359e8c3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_exe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build EXE
on:
push:
branches:
- main
tags:
- "*.*.*"
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: poetry install
- name: Build executables
run: scripts/build_executables.ps1
- uses: ncipollo/release-action@v1
with:
artifacts: |
dist/OpenOpcCli.exe
dist/OpenOpcServer.exe
dist/OpenOpcService.exe
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openopc2"
version = "0.1.7"
version = "0.1.8"
description = "OPC library with a Windows gateway enabling non-Windows clients to access OPC-DA calls."
license = "GPL-2.0-or-later"
readme = "README.md"
Expand All @@ -13,9 +13,9 @@ keywords = ["opc", "openopc", "opc-da", "opc classic"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Human Machine Interfaces",
"Topic :: Scientific/Engineering :: Human Machine Interfacesr",
"Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
"Intended Audience :: Manufacturing"
"Intended Audience :: Manufacturing",
]

[tool.poetry.dependencies]
Expand Down
12 changes: 6 additions & 6 deletions scripts/build_executables.ps1
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@

pyinstaller --onefile `
poetry run pyinstaller --onefile `
--clean `
--noconfirm `
--paths ./openopc2 `
--hidden-import=json `
--hidden-import=win32timezone `
--hidden-import=pythoncom `
--name OpenOpcService `
../openopc2/gateway_service.py
openopc2/gateway_service.py


pyinstaller --onefile `
poetry run pyinstaller --onefile `
--clean `
--noconfirm `
--paths ./openopc2 `
--hidden-import=json `
--hidden-import=win32timezone `
--hidden-import=pythoncom `
--name OpenOpcCli `
../openopc2/cli.py
openopc2/cli.py

pyinstaller --onefile `
poetry run pyinstaller --onefile `
--clean `
--noconfirm `
--paths ./openopc2 `
--hidden-import=json `
--hidden-import=win32timezone `
--hidden-import=pythoncom `
--name OpenOpcServer `
../openopc2/gateway_server.py
openopc2/gateway_server.py

0 comments on commit 359e8c3

Please sign in to comment.