Update yml change name and icon #11
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: Create Release | |
on: | |
push: | |
branches: | |
- develop | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install PyInstaller and Pillow | |
run: | | |
pip install pyinstaller | |
pip install pillow | |
- name: Convert PNG to ICO | |
run: | | |
python -c "from PIL import Image; img = Image.open('img/icon.png'); img.save('icon.ico')" | |
- name: Build executable | |
run: pyinstaller --onefile --windowed --icon=icon.ico --name=DBCompare main.py | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v9 | |
release_name: Release v9 | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/DBCompare.exe | |
asset_name: DBCompare.exe | |
asset_content_type: application/octet-stream |