From 605b3df7e134ca15fd7c065e6acd644f3ca24058 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Tue, 28 Nov 2023 20:19:23 +0800 Subject: [PATCH] publish add cache --- .github/workflows/publish.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d152658..e712a93 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,20 +16,21 @@ jobs: steps: - name: Checkout repository # 检出仓库 uses: actions/checkout@v2 # 使用 GitHub 官方的 checkout action + - run: | - git fetch --prune --unshallow + git fetch --prune --unshallow # 获取完整的 git 历史记录 - name: Set up Python # 设置 Python 环境 - uses: actions/setup-python@v2 # 使用 GitHub 官方的 setup-python action + - uses: actions/setup-python@v4 with: - python-version: 3.8 # 指定 Python 版本 (3.8) - - - name: Install dependencies # 安装依赖 - run: | + python-version: '3.8' + cache: 'pip' # caching pip dependencies + - run: | python -m pip install --upgrade pip pip install build python -m pip install --upgrade twine pip install pyinstaller + pip install -r requirements.txt - name: Build package run: | @@ -45,8 +46,6 @@ jobs: run: | ls -l dist ls -l "${{ github.workspace }}" -# cd dist -# ./pywxdump.exe - name: Publish package with Twine # 使用 Twine 发布到 PyPI run: |