尝试设置端口检测超时时间 #579
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dev_shawn分支自动打包 | |
on: | |
push: | |
branches: | |
- dev_shawn | |
workflow_dispatch: | |
jobs: | |
build-win-amd64: | |
runs-on: windows-latest | |
steps: | |
- name: download source | |
uses: actions/checkout@v4 | |
with: | |
path: main | |
- name: download updater | |
uses: actions/checkout@v4 | |
with: | |
repository: ArkMowers/updater | |
path: updater | |
- name: setup nodejs 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Install UPX | |
uses: crazy-max/ghaction-upx@v2 | |
with: | |
install-only: true | |
- name: Set up Python 3.8 amd64 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
cache: pip | |
architecture: x64 | |
- name: build frontend | |
working-directory: ./main/ui | |
shell: bash | |
run: | | |
npm ci | |
npm run build | |
cp -r dist ../ | |
- name: Install dependencies | |
working-directory: ./main | |
shell: cmd | |
run: | | |
python -m venv venv | |
venv\Scripts\pip install -r requirements.txt | |
venv\Scripts\pip install -U pyinstaller xxhash backports.zoneinfo[tzdata] | |
- name: change version number | |
if: github.event.head_commit.message != '发版' | |
working-directory: ./main | |
shell: bash | |
run: | | |
sed -i "s/__version__ = '\(.*\)'/__version__ = '\1+${GITHUB_SHA::7}'/g" ./arknights_mower/__init__.py | |
- name: download docs | |
uses: actions/checkout@v4 | |
with: | |
path: docs | |
ref: doc-pages | |
- name: setup ruby | |
uses: ruby/setup-ruby@v1 | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/docs/Gemfile | |
with: | |
ruby-version: "2.7.8" | |
bundler-cache: true | |
- name: build docs | |
working-directory: ./docs | |
shell: cmd | |
run: | | |
bundle exec jekyll build -b /docs | |
- name: Make package | |
working-directory: ./main | |
shell: cmd | |
run: | | |
set PYTHONHASHSEED=114514 | |
set SOURCE_DATE_EPOCH=1694076231 | |
venv\Scripts\pyinstaller .\webui_zip.spec --distpath=mower | |
move ..\docs\_site mower\mower\_internal\dist\docs | |
- name: calculate hash | |
working-directory: ./main/mower/mower | |
shell: cmd | |
run: | | |
..\..\venv\Scripts\python.exe ..\..\..\updater\publish.py | |
- name: create zip | |
working-directory: ./main/mower | |
shell: bash | |
run: | | |
zip -r mower.zip mower | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mower | |
path: main/mower/mower.zip |