From 7c12b660dde1f71cd2da23757dbd20a9b23e59ae Mon Sep 17 00:00:00 2001 From: farion1231 Date: Wed, 6 Aug 2025 23:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20GitHub=20Actions=20Release?= =?UTF-8?q?=20=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 contents: write 权限解决 403 错误 - 使用 release/* 匹配所有构建文件 - 添加调试步骤显示构建产物 - 优化 matrix 配置增加平台标识 --- .github/workflows/release.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 498bde8..7782c64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,13 +5,22 @@ on: tags: - 'v*' +permissions: + contents: write + jobs: release: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + include: + - os: windows-latest + platform: win32 + - os: ubuntu-latest + platform: linux + - os: macos-latest + platform: darwin steps: - name: Checkout code @@ -51,15 +60,18 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: List build files (debug) + shell: bash + run: | + echo "Listing release directory:" + ls -la release/ || echo "No release directory found" + find . -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" || echo "No build files found" + - name: Upload Release Assets uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | - release/*.exe - release/*.dmg - release/*.AppImage - release/*.deb - release/*.rpm + release/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file