Skip to content

Commit 1fe88d1

Browse files
committed
fix: 修复GitHub Actions Release配置
- 修复cross-compile任务条件,支持标签推送时运行 - 只上传压缩包到artifacts,不包含原始二进制文件 - 修复release任务的文件路径,使用明确的目录 - 添加调试步骤列出下载的文件 - 确保每个平台的压缩包单独上传到Release
1 parent 71f1ce2 commit 1fe88d1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/go.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
name: 交叉编译
7777
runs-on: ubuntu-latest
7878
needs: test
79-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/001-py-to-go-migration')
79+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/001-py-to-go-migration' || startsWith(github.ref, 'refs/tags/'))
8080
steps:
8181
- name: 检出代码
8282
uses: actions/checkout@v4
@@ -118,7 +118,8 @@ jobs:
118118
with:
119119
name: binaries
120120
path: |
121-
jsfindcrack-*
121+
jsfindcrack-*.tar.gz
122+
jsfindcrack-*.zip
122123
retention-days: 30
123124

124125
lint:
@@ -152,14 +153,22 @@ jobs:
152153
uses: actions/download-artifact@v4
153154
with:
154155
name: binaries
156+
path: ./release-files
157+
158+
- name: 列出下载的文件
159+
run: |
160+
echo "下载的文件:"
161+
ls -la ./release-files/
155162
156163
- name: 创建Release
157164
uses: softprops/action-gh-release@v1
158165
with:
159166
files: |
160-
jsfindcrack-*.tar.gz
161-
jsfindcrack-*.zip
167+
./release-files/*.tar.gz
168+
./release-files/*.zip
162169
fail_on_unmatched_files: true
163170
generate_release_notes: true
171+
draft: false
172+
prerelease: false
164173
env:
165174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)