-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and release workflows #90
Open
ngaihan
wants to merge
18
commits into
mak448a:main
Choose a base branch
from
ngaihan:test-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bb484d3
workflow changes
ngaihan 26170fb
test of windows build
ngaihan eab4186
forgot to change name
ngaihan 98b1c0e
minor change from exe to zip being uploaded
ngaihan 013e001
minor indent change
ngaihan 842d1af
added pyinstaller command to build exe
ngaihan 1ac28e8
reformatted and fixed compress-archive line
ngaihan ff3873d
added dmg creation to build macos
ngaihan 3fd73a7
removed zip file creation
ngaihan f66a93e
removed duplicate files and installation of dependencies in build-win…
ngaihan b6d00c1
changed package_windows as it seems to be the issue
ngaihan 368a5ca
deleted duplicate files
ngaihan 101ac17
debug to find error
ngaihan 6fa0e58
fixed path to spec file and added dynamic determination of paths
ngaihan 8720a3f
cleaned up code and added debug
ngaihan cdfdfb9
removed the change in directory
ngaihan f290d0e
removed the prev directory path
ngaihan 6ab5f45
Update build-macos.yml
mak448a File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,44 @@ | ||
name: Build macOS | ||
run-name: Build macOS | ||
on: | ||
push: | ||
tags: | ||
- "**" | ||
# on: | ||
# push | ||
push: | ||
tags: | ||
- "**" | ||
|
||
jobs: | ||
Build-macOS: | ||
runs-on: macos-latest | ||
steps: | ||
# Use Python 3.12.4 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12.4" | ||
- run: pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_mac.py && mkdir src/dist/Qtcord-macOS && mv src/dist/Qtcord-macOS.app src/dist/Qtcord-macOS | ||
- uses: actions/upload-artifact@v4 | ||
|
||
- name: Install dependencies and build | ||
run: | | ||
pip install -r requirements.txt | ||
pip install pyinstaller | ||
python3 helper_scripts/package_mac.py | ||
|
||
- name: Prepare release artifacts | ||
run: | | ||
mkdir -p src/dist/Qtcord-macOS | ||
|
||
# Create .dmg file | ||
brew install create-dmg | ||
create-dmg \ | ||
--volname "Qtcord" \ | ||
--window-pos 200 120 \ | ||
--window-size 800 400 \ | ||
--icon-size 100 \ | ||
--app-drop-link 600 185 \ | ||
Qtcord-${{github.ref_name}}-macOS-x86_64.dmg \ | ||
src/dist/Qtcord-macOS.app | ||
|
||
- name: Upload Release Assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: "Qtcord-macOS" | ||
path: "src/dist/Qtcord-macOS" | ||
files: | | ||
Qtcord-${{github.ref_name}}-macOS-x86_64.zip | ||
Qtcord-${{github.ref_name}}-macOS-x86_64.dmg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,30 @@ on: | |
push: | ||
tags: | ||
- "**" | ||
# on: [push] | ||
|
||
jobs: | ||
Build-Windows: | ||
runs-on: windows-latest | ||
steps: | ||
# Use Python 3.12.4 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12.4" | ||
- run: pip install -r requirements.txt && pip install pyinstaller && python3 helper_scripts/package_windows.py | ||
- uses: actions/upload-artifact@v4 | ||
|
||
- name: Install dependencies and build | ||
run: | | ||
pip install -r requirements.txt | ||
pip install pyinstaller | ||
python3 helper_scripts/package_windows.py | ||
pyinstaller helper_scripts/win.spec | ||
mak448a marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Rename and Compress Executable | ||
run: | | ||
Move-Item -Path ".\dist\Qtcord-Windows\Qtcord.exe" -Destination ".\Qtcord-${{github.ref_name}}-Windows-x86_64.exe" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you forget to include everything in the folder |
||
Compress-Archive -Path ".\Qtcord-${{github.ref_name}}-Windows-x86_64.exe" -DestinationPath ".\Qtcord-${{github.ref_name}}-Windows-x86_64.zip" | ||
|
||
- name: Upload Release Asset | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: "Qtcord-Windows" | ||
path: "src/dist/Qtcord-Windows" | ||
files: "Qtcord-${{github.ref_name}}-Windows-x86_64.zip" |
mak448a marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['src\\main.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
optimize=0, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.datas, | ||
[], | ||
name='main', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
runtime_tmpdir=None, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) |
mak448a marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['helper_scripts\\package_mac.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
optimize=0, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='package_mac', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) | ||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='package_mac', | ||
) |
mak448a marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['helper_scripts\\package_windows.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
optimize=0, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='package_windows', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) | ||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='package_windows', | ||
) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the zip file is being uploaded, where did it go?
![image](https://private-user-images.githubusercontent.com/94062293/394900154-18361616-7a00-4680-9707-aa9a6576f7ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Mjc0NzMsIm5iZiI6MTczOTYyNzE3MywicGF0aCI6Ii85NDA2MjI5My8zOTQ5MDAxNTQtMTgzNjE2MTYtN2EwMC00NjgwLTk3MDctYWE5YTY1NzZmN2VmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEzNDYxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2NGVlYzJhOTI4ZDE1ZDBkYzBiZTJlZjQ1ZDA3NDgyMmNkMDUyNzg4ZTlmOTg2OWUwYWQ0ZDE5ZTcwMzIyMmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.JIMNMi3vQotBjymKQf6c5b_Qgg5w4f5HSyDwsANGL6s)