From 0c36f6139bb2423782e7f39407a27f2c1e5f5ebf Mon Sep 17 00:00:00 2001 From: konsthol Date: Sun, 15 Dec 2024 00:23:18 +0200 Subject: [PATCH] Herp derp I left the debug in there and forgot to reset errors. --- .gitea/workflows/build.yaml | 19 ------------ .gitea/workflows/release.yaml | 55 +++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 3 files changed, 56 insertions(+), 19 deletions(-) delete mode 100644 .gitea/workflows/build.yaml create mode 100644 .gitea/workflows/release.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index c537cc6..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] - -jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..d616934 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,55 @@ +name: Build and Release + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build with PyInstaller + run: | + cd app + pyinstaller --onefile --add-data "ui:ui" wolServer.py + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: executable + path: app/dist/wolServer + + - name: Create Release + run: | + curl -X POST "https://git.konsthol.eu/api/v1/repos/konsthol/WOL-Ly/releases" \ + -H "Authorization: token ${{ secrets.mytoken }}" \ + -H "Content-Type: application/json" \ + -d '{ + "tag_name": "v1.0.0", + "target_commitish": "main", + "name": "v1.0.0", + "body": "Release description", + "draft": false, + "prerelease": false, + "assets": [ + { + "name": "wolServer", + "path": "app/dist/wolServer" + } + ] + }' diff --git a/requirements.txt b/requirements.txt index f5818ee..65075c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +pyinstaller==6.11.1 Flask==3.1.0 flask_httpauth==4.8.0 flask_limiter==3.9.2