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