1+ name : CI - Build Release
2+ on :
3+ push :
4+ paths-ignore :
5+ - ' docs/**'
6+ workflow_dispatch :
7+ inputs :
8+ tag_version :
9+ description : ' Version'
10+ required : true
11+ type : string
12+ default : ' 3.0.1'
13+ pre_release :
14+ description : ' Pre-release or not'
15+ required : true
16+ type : boolean
17+ default : false
18+ desciption :
19+ description : ' desciption'
20+ required : true
21+ type : string
22+ default : " "
23+ jobs :
24+ build :
25+ name : Build Release
26+ runs-on : macos-26
27+ if : github.repository_owner == 'hackdoc'
28+
29+ env :
30+ # GitHub Information
31+ branch : ${{ github.ref }}
32+ pre : ${{inputs.pre_release}}
33+ tag : ${{inputs.tag_version}}
34+ des : ${{inputs.desciption}}
35+ commiturl : ${{ github.event.head_commit.url }}${{ github.event.release.html_url }}
36+ commitdate : ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }}
37+
38+ steps :
39+ - uses : actions/checkout@v4
40+ - name : Set up Python
41+ uses : actions/setup-python@v5
42+ with :
43+ python-version : ' 3.12'
44+ - name : Install Dependencies
45+ run : |
46+ rm -rf Univ*
47+ rm -rf *pay*.dmg
48+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install -r requirements.txt
49+
50+ - name : Force x86_64 charset for Python
51+ run : |
52+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip uninstall -y charset_normalizer
53+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip download --platform macosx_10_13_x86_64 --only-binary=:all: charset-normalizer
54+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip install charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl
55+
56+ - name : Prepare Assets (--prepare-assets)
57+
58+ run : >
59+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 Build-Project.command
60+ --run-as-individual-steps
61+ --prepare-assets
62+
63+ - name : Prepare Application (--prepare-application)
64+ run : >
65+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 Build-Project.command
66+ --git-branch "${{ env.branch }}" --git-commit-url "${{ env.commiturl }}" --git-commit-date "${{ env.commitdate }}"
67+ --reset-pyinstaller-cache
68+ --run-as-individual-steps
69+ --prepare-application
70+
71+ - name : Prepare Package (--prepare-package)
72+ run : >
73+ /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 Build-Project.command
74+ --run-as-individual-steps
75+ --prepare-package
76+ - name : Create Pre-Release on Push
77+ if : github.event_name == 'push'
78+ uses : softprops/action-gh-release@v2
79+ with :
80+ tag_name : ${{env.tag}}
81+ name : ${{env.tag}}
82+ body : ${{ env.des }}
83+ prerelease : false
84+ files : |
85+ ./dist/AutoPkg-Assets.pkg
86+ ./dist/OCLP-R.pkg
87+ ./dist/OCLP-R-Uninstaller.pkg
0 commit comments