From ea4fc993c788b2c8d41451aead59f0ea0e776cb3 Mon Sep 17 00:00:00 2001 From: Isaac Holston Date: Sat, 18 Nov 2023 18:48:11 -0700 Subject: [PATCH] feat: add github actions --- .github/workflows/build_and_release.yaml | 43 ++++++++++++++++++++++++ tray.py | 3 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_and_release.yaml diff --git a/.github/workflows/build_and_release.yaml b/.github/workflows/build_and_release.yaml new file mode 100644 index 0000000..0e8ef84 --- /dev/null +++ b/.github/workflows/build_and_release.yaml @@ -0,0 +1,43 @@ +name: Build and Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: [windows-latest] + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 + - name: Build artifact + run: | + pip install -r requirements.txt pyinstaller + pyinstaller --onefile --noconsole --name heimerdinger --icon=icon.png --add-data "icon.png:." main.py + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: heimerdinger + path: dist/* + + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: heimerdinger + - name: Push to release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + replacesArtifacts: false + artifacts: heimerdinger.exe \ No newline at end of file diff --git a/tray.py b/tray.py index df50d41..caee860 100644 --- a/tray.py +++ b/tray.py @@ -1,6 +1,7 @@ -import pystray import os import sys + +import pystray from PIL import Image