skip pyinstaller for py 2.7 (#393)

* skip pyinstaller for py 2.7

* fix ddns -h
This commit is contained in:
New Future
2023-04-19 18:05:16 +08:00
committed by GitHub
parent a1a8f8565c
commit b6bf4e4019
2 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -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/
+2 -2
View File
@@ -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