Added badge to the README #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Windows Executable | |
| on: | |
| [push, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[run ci]') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Build executable with PyInstaller | |
| run: | | |
| pyinstaller --noconsole --onefile --name MonsterBattle --add-data "images;images" --add-data "audio;audio" code\main.py | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: MonsterBattle-Windows | |
| path: dist/MonsterBattle.exe | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ github.run_number }} | |
| name: Monster Battle v${{ github.run_number }} | |
| files: dist/MonsterBattle.exe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |