mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-21 05:26:51 +00:00
skip pyinstaller for py 2.7 (#393)
* skip pyinstaller for py 2.7 * fix ddns -h
This commit is contained in:
@@ -71,7 +71,8 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: pip install pyinstaller${{ fromJSON('["","==3.6"]')[matrix.python-version == '2.7'] }}
|
||||
if: matrix.python-version != '2.7'
|
||||
run: pip install pyinstaller
|
||||
|
||||
# Prepare build version and cert
|
||||
- name: Replace build version
|
||||
@@ -84,13 +85,17 @@ jobs:
|
||||
- run: python ./run.py -h
|
||||
|
||||
- name: Package binary
|
||||
if: matrix.python-version != '2.7'
|
||||
run: python -O -m PyInstaller --noconfirm --clean .build/ddns.spec
|
||||
|
||||
- run: ./dist/ddns || test -e config.json
|
||||
if: matrix.python-version != '2.7'
|
||||
- run: ./dist/ddns -h
|
||||
if: matrix.python-version != '2.7'
|
||||
|
||||
# Upload build result
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: matrix.python-version != '2.7'
|
||||
with:
|
||||
name: ${{ matrix.os }}-py${{ matrix.python-version }}
|
||||
path: dist/
|
||||
|
||||
@@ -106,9 +106,9 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "2.7"
|
||||
python-version: "3.x"
|
||||
- name: Install dependencies
|
||||
run: pip install pyinstaller==3.6
|
||||
run: pip install pyinstaller
|
||||
|
||||
- name: Replace build version
|
||||
run: sed -i.tmp -e "s#\${BUILD_VERSION}#${{ github.ref_name }}#" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py && rm run.py.tmp
|
||||
|
||||
Reference in New Issue
Block a user