Skip to content

Commit 8fdb7be

Browse files
committed
Update ym to trig a build on develop
1 parent 915ef89 commit 8fdb7be

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

.github/workflows/build_exe.yml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,44 @@
1-
name: Build DBCompare Executable
1+
name: Create Release
22

33
on:
44
push:
5-
tags:
6-
- 'v*' # This will trigger the workflow for any tag starting with 'v'
5+
branches:
6+
- develop
77

88
jobs:
99
build:
1010
runs-on: windows-latest
11-
1211
steps:
13-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v2
1413

1514
- name: Set up Python
16-
uses: actions/setup-python@v4
15+
uses: actions/setup-python@v2
1716
with:
1817
python-version: '3.x'
1918

20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install pyinstaller pillow
24-
25-
- name: Convert PNG to ICO
26-
run: |
27-
python -c "from PIL import Image; img = Image.open('img/icon.png'); img.save('icon.ico')"
19+
- name: Install PyInstaller
20+
run: pip install pyinstaller
2821

2922
- name: Build executable
30-
run: |
31-
pyinstaller --onefile --windowed --add-data "img/icon.png;img" --icon="icon.ico" main.py
32-
33-
- name: List dist directory # Check if the executable is created
34-
run: dir dist # For Windows, this will list files in the dist directory
35-
36-
- name: Create ZIP file
37-
run: |
38-
Compress-Archive -Path dist\dbcompare.exe -DestinationPath dbcompare.zip
23+
run: pyinstaller --onefile --windowed main.py
3924

4025
- name: Create Release
41-
uses: softprops/action-gh-release@v1
26+
id: create_release
27+
uses: actions/create-release@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4230
with:
43-
tag_name: ${{ github.ref }} # Use the tag that triggered this workflow
44-
files: |
45-
dist\dbcompare.exe
46-
dbcompare.zip
47-
name: Release ${{ github.ref_name }}
48-
body: This is a new release of DBCompare.
31+
tag_name: v${{ github.run_number }}
32+
release_name: Release v${{ github.run_number }}
33+
draft: false
34+
prerelease: false
35+
36+
- name: Upload Release Asset
37+
uses: actions/upload-release-asset@v1
4938
env:
5039
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
upload_url: ${{ steps.create_release.outputs.upload_url }}
42+
asset_path: ./dist/main.exe
43+
asset_name: main.exe
44+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)