From a8d8dbc8e1e02f340e2af38811ce5c837f60b2d0 Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 18:40:26 +0100 Subject: [PATCH 1/6] initial workflow file --- build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 build.yml diff --git a/build.yml b/build.yml new file mode 100644 index 0000000..d680234 --- /dev/null +++ b/build.yml @@ -0,0 +1,35 @@ +name: Build Executable Files +on: [push] +jobs: + build: + continue-on-error: true + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Set up Git Repository + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "^3.9" + - name: Build Executable + uses: Nuitka/Nuitka-Action@main + with: + nuitka-version: main + script-name: src/FarmUpload.py + one-file: true + enable-plugin: tk-inter + macos-create-app-bundle: true + macos-app-icon: img/icon.png + windows-icon-from-ico: img/icon.png + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + build/*.exe + build/*.bin + build/*.app/**/* From 3c4565b6064e4c636d717f1f872c4389b734c824 Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 18:41:23 +0100 Subject: [PATCH 2/6] move build file to correct location --- build.yml => .github/workflows/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build.yml => .github/workflows/build.yml (100%) diff --git a/build.yml b/.github/workflows/build.yml similarity index 100% rename from build.yml rename to .github/workflows/build.yml From 463b0016f4ecf61b1317e7b43d11643a24a9da50 Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 18:43:27 +0100 Subject: [PATCH 3/6] correct expected values for action --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d680234..5c92f90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,8 @@ jobs: with: nuitka-version: main script-name: src/FarmUpload.py - one-file: true - enable-plugin: tk-inter + onefile: true + enable-plugins: tk-inter macos-create-app-bundle: true macos-app-icon: img/icon.png windows-icon-from-ico: img/icon.png From 7f290d9eb9c5ea60ef091e71150430a7b8e26696 Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 18:49:48 +0100 Subject: [PATCH 4/6] fix image conversion --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c92f90..d18a31f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,6 +14,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: "^3.9" + + - name: Image Conversion Package + run: python -m pip install imageio - name: Build Executable uses: Nuitka/Nuitka-Action@main with: @@ -22,7 +25,7 @@ jobs: onefile: true enable-plugins: tk-inter macos-create-app-bundle: true - macos-app-icon: img/icon.png + macos-app-icon: src/icon.icns windows-icon-from-ico: img/icon.png - name: Release From 90516caa67de1c4ed4f995b9ce4a89fb77792bdf Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 21:24:09 +0100 Subject: [PATCH 5/6] update to not run unless a new tag is created --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d18a31f..0e7b9b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,10 @@ name: Build Executable Files -on: [push] +on: + push: + branches: + - "main" + tags: + - "v*.*.*" jobs: build: continue-on-error: true @@ -27,7 +32,6 @@ jobs: macos-create-app-bundle: true macos-app-icon: src/icon.icns windows-icon-from-ico: img/icon.png - - name: Release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') From 82afca6a4a0fdbabece784f4b470e531dc0cc070 Mon Sep 17 00:00:00 2001 From: henrygrv Date: Sat, 8 Jun 2024 21:28:27 +0100 Subject: [PATCH 6/6] upload build artifacts to action --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e7b9b2..72510fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,3 +40,11 @@ jobs: build/*.exe build/*.bin build/*.app/**/* + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }} Build + path: | + build/*.exe + build/*.bin + build/*.app/**/*