mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 19:45:24 +00:00
Update build.yml
This commit is contained in:
parent
4a841692e7
commit
83709c88e7
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -17,7 +17,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: startsWith(github.ref_name, 'v') && github.event.inputs.publish_pypi == 'true'
|
if: (startsWith(github.ref_name, 'v') || github.event_name == 'workflow_dispatch') && github.event.inputs.publish_pypi == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -39,7 +39,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install setuptools wheel twine
|
python -m pip install setuptools wheel twine
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: python setup.py sdist bdist_wheel
|
run: python setup.py sdist bdist_wheel
|
||||||
|
|
||||||
@ -50,7 +49,7 @@ jobs:
|
|||||||
run: twine upload dist/*
|
run: twine upload dist/*
|
||||||
|
|
||||||
build:
|
build:
|
||||||
if: startsWith(github.ref_name, 'v') && github.event.inputs.publish_pypi == 'false'
|
if: (startsWith(github.ref_name, 'v') || github.event_name == 'workflow_dispatch') && github.event.inputs.publish_pypi == 'false'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
@ -68,7 +67,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$latestTag = git describe --tags --abbrev=0
|
$latestTag = git describe --tags --abbrev=0
|
||||||
echo "latest_tag=$latestTag" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
echo "latest_tag=$latestTag" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@ -79,7 +77,6 @@ jobs:
|
|||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
python -m pip install pyinstaller
|
python -m pip install pyinstaller
|
||||||
|
|
||||||
- name: Build executable with PyInstaller (Windows)
|
- name: Build executable with PyInstaller (Windows)
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
@ -95,7 +92,6 @@ jobs:
|
|||||||
--hidden-import=pyTelegramBotAPI --additional-hooks-dir=pyinstaller/hooks `
|
--hidden-import=pyTelegramBotAPI --additional-hooks-dir=pyinstaller/hooks `
|
||||||
--add-data "StreamingCommunity;StreamingCommunity" `
|
--add-data "StreamingCommunity;StreamingCommunity" `
|
||||||
--name=StreamingCommunity_win --icon=".github/media/logo.ico" test_run.py
|
--name=StreamingCommunity_win --icon=".github/media/logo.ico" test_run.py
|
||||||
|
|
||||||
- name: Build executable with PyInstaller (Linux)
|
- name: Build executable with PyInstaller (Linux)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
@ -110,7 +106,6 @@ jobs:
|
|||||||
--hidden-import=pyTelegramBotAPI --additional-hooks-dir=pyinstaller/hooks \
|
--hidden-import=pyTelegramBotAPI --additional-hooks-dir=pyinstaller/hooks \
|
||||||
--add-data "StreamingCommunity:StreamingCommunity" \
|
--add-data "StreamingCommunity:StreamingCommunity" \
|
||||||
--name=StreamingCommunity_linux test_run.py
|
--name=StreamingCommunity_linux test_run.py
|
||||||
|
|
||||||
- name: Build executable with PyInstaller (macOS)
|
- name: Build executable with PyInstaller (macOS)
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user