Skip to content

Commit ab34211

Browse files
committed
Update windows.yml
1 parent 89c73d9 commit ab34211

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/windows.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
modules: 'qthttpserver qtwebsockets'
4343
env:
4444
BUILD_TYPE: Release
45+
BUILD_PATH: build
4546
assume: --release
4647
# 步骤
4748
steps:
@@ -69,8 +70,8 @@ jobs:
6970
id: build
7071
shell: cmd
7172
run: |
72-
mkdir build
73-
cd build
73+
mkdir ${{ env.BUILD_PATH }}
74+
cd ${{ env.BUILD_PATH }}
7475
cmake --version
7576
cmake -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_INSTALL_PREFIX=${{ github.workspace }} ../
7677
ls
@@ -80,7 +81,7 @@ jobs:
8081
prefix: ${{ github.workspace }}
8182
shell: pwsh
8283
run: |
83-
cd ${{ github.workspace }}/build
84+
cd ${{ github.workspace }}/${{ env.BUILD_PATH }}
8485
cmake --build . --target INSTALL --config ${{ env.BUILD_TYPE }}
8586
ls
8687
# 打包
@@ -90,7 +91,7 @@ jobs:
9091
archiveName: 'QCloudMusicApi-${{ github.ref_name }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }}'
9192
shell: pwsh
9293
run: |
93-
cd ${{ github.workspace }}/build
94+
cd ${{ github.workspace }}/${{ env.BUILD_PATH }}
9495
ls
9596
Tree ${{ env.BUILD_TYPE }} /F
9697
@@ -111,14 +112,14 @@ jobs:
111112
- uses: actions/upload-artifact@v2
112113
with:
113114
name: ${{ steps.package.outputs.packageName }}
114-
path: ${{ github.workspace }}/build/${{ env.BUILD_TYPE }}
115+
path: ${{ github.workspace }}/${{ env.BUILD_PATH }}/${{ env.BUILD_TYPE }}
115116
# tag 上传Release
116117
- name: Upload Release
117118
if: startsWith(github.event.ref, 'refs/tags/')
118119
uses: svenstaro/upload-release-action@v2
119120
with:
120121
repo_token: ${{ secrets.GITHUB_TOKEN }}
121-
file: ${{ github.workspace }}/build/${{ steps.package.outputs.packageName }}.zip
122+
file: ${{ github.workspace }}/${{ env.BUILD_PATH }}/${{ steps.package.outputs.packageName }}.zip
122123
asset_name: ${{ steps.package.outputs.packageName }}.zip
123124
tag: ${{ github.ref }}
124125
overwrite: true

0 commit comments

Comments
 (0)