From 3446a234e7998f9ae4d0e5b3e8f6248742387469 Mon Sep 17 00:00:00 2001 From: QiuSYan Date: Fri, 12 Jul 2024 09:07:21 +0800 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..f808a38 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Build Actions + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Build executable + run: pyinstaller -F gacha.py -i icon.ico + + - name: Create ZIP file + run: | + cp banners.json dist + cd dist + 7z a ../gacha.zip gacha.exe banners.json + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gacha + path: gacha.zip