Skip to content

Commit

Permalink
skip pyinstaller for py 2.7 (NewFuture#393)
Browse files Browse the repository at this point in the history
* skip pyinstaller for py 2.7

* fix ddns -h
  • Loading branch information
NewFuture committed Apr 19, 2023
1 parent a1a8f85 commit b6bf4e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6bf4e4

Please sign in to comment.