From b6bf4e40195efbb8a8c648c95a709710a900d342 Mon Sep 17 00:00:00 2001 From: New Future Date: Wed, 19 Apr 2023 18:05:16 +0800 Subject: [PATCH] skip pyinstaller for py 2.7 (#393) * skip pyinstaller for py 2.7 * fix ddns -h --- .github/workflows/build.yml | 7 ++++++- .github/workflows/publish.yml | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b20a7af..b8d88ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ca1bbd5..714bcd3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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