Skip to content

Commit daea24c

Browse files
wangchunyan.boltclaude
andcommitted
修复 tar.gz 文件创建路径问题
使用 tar -C 参数指定源目录,保持工作目录在根目录 确保 ls 和 file 命令能正确找到创建的文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 09f4cfd commit daea24c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ jobs:
7878
shell: bash
7979
run: |
8080
set -e
81-
cd target/${{ matrix.target }}/release
82-
tar -czf ../../../${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
83-
cd ../..
81+
tar -czf ${{ matrix.asset_name }}.tar.gz -C target/${{ matrix.target }}/release ${{ matrix.artifact_name }}
8482
ls -lh ${{ matrix.asset_name }}.tar.gz
8583
file ${{ matrix.asset_name }}.tar.gz
8684

0 commit comments

Comments
 (0)