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