From f55f39535a7e197340a0831e1b8fd949c6a4f7b1 Mon Sep 17 00:00:00 2001 From: justaCasualCoder <120528794+justaCasualCoder@users.noreply.github.com> Date: Sat, 23 Dec 2023 09:33:59 -0500 Subject: [PATCH] Add Windows GitHub Action. --- .github/workflows/windows_build.yml | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/windows_build.yml diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml new file mode 100644 index 0000000..5ef4a7e --- /dev/null +++ b/.github/workflows/windows_build.yml @@ -0,0 +1,52 @@ +name: Build and Release + +on: + workflow_dispatch: {} + push: + paths: + - '.github/workflows/windows_build.yml' + - 'guiunstable.py' +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Download Heimdall + run: | + wget https://bitbucket.org/benjamin_dobell/heimdall/downloads/heimdall-suite-1.4.0-win32.zip + unzip heimdall-suite-1.4.0-win32.zip -d heimdall + mv "heimdall/Heimdall Suite/"* heimdall + rm heimdall/Qt* + rmdir "heimdall/Heimdall Suite" + + + - name: Build + run: | + pyinstaller --add-data ./heimdall:heimdall --onefile guiunstable.py + mv dist/* dist/SamsungFlashGUI.exe + + - name: Create info file + run: | + echo -e "ref: $GITHUB_REF \ncommit: $GITHUB_SHA\nbuild: $(date +"%Y-%m-%dT%H:%M:%SZ")" \ + > dist/info.txt + + - name: Update Windows release + uses: pyTooling/Actions/releaser@r0 + with: + tag: windows + rm: true + token: ${{ secrets.GITHUB_TOKEN }} + files: dist/* + \ No newline at end of file