From 4992a6d01de83eb09c949e62076e2f2e3a2ad04f Mon Sep 17 00:00:00 2001 From: hdeadman Date: Tue, 19 Jul 2022 22:18:51 -0400 Subject: [PATCH] Add build of compiled python app on push to main branch - checks out code - installs dependencies (or downloads pip cache) - installs cx_Freeze - builds python executable - uploads compiled folder as artifact People can download the zipped artifact from the build action. --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..b104145a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +env: + PYTHON_VERSION: '3.10' + +on: + push: + branches: + - 'main' + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout Code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + cache-dependency-path: 'requirements.txt' + - name: Install Dependencies + run: pip install -r requirements.txt + - name: Install cx_Freeze + run: pip install cx_Freeze + - name: Build Native Executable + run: python setup.py build + - name: Get commit hash + id: commit + uses: pr-mpt/actions-commit-hash@v1 + - name: Upload Compiled Version + uses: actions/upload-artifact@v3 + with: + name: VALORANT-rank-yoinker-${{ steps.commit.outputs.short }} + path: build/exe.win-amd64-${{ env.PYTHON_VERSION }}/**