Update main.yml #4
This file contains 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 epo.exe with PyInstaller | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
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 pyinstaller | |
pip install -r requirements.txt | |
- name: Build epo.exe | |
run: | | |
pyinstaller --onefile --name epo epo.py | |
- name: Upload epo.exe as artifact | |
uses: actions/upload-artifact@v4 # Zaktualizowana wersja (v4) | |
with: | |
name: epo-executable | |
path: dist/epo.exe | |
- name: Commit and push epo.exe to repository | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
git add dist/epo.exe | |
git commit -m "Add built epo.exe" | |
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |