diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a57c9e3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +name: Build Workflow + +on: + push: + branches: release + +jobs: + build-windows: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Install Python + uses: actions/setup-python@v1 + with: + python-version: '3.11' + architecture: 'x64' + - name: Install requirements + run: | + pip install -r requirements.txt + - name: Run PyInstaller + run: | + python -m PyInstaller "Moza Temp Monitor.spec" + - uses: actions/upload-artifact@v2 + with: + name: Windows_moza_temp + path: "dist/Moza Temp Monitor.exe" + + - name: create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.head_commit.message }} + release_name: ${{ github.event.head_commit.message }} + overwrite: true + body: | + Test Release v1.0.0 + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{steps.create_release.outputs.upload_url}} + asset_path: "dist/Moza Temp Monitor.exe" + asset_name: "Moza Temp Monitor.exe" + asset_content_type: application/zip \ No newline at end of file diff --git a/Moza Temp Monitor.spec b/Moza Temp Monitor.spec new file mode 100644 index 0000000..63b50b8 --- /dev/null +++ b/Moza Temp Monitor.spec @@ -0,0 +1,38 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['start.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='Moza Temp Monitor', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=['moza.ico'], +)