Skip to content

Commit d966449

Browse files
authored
update
1 parent c5672fb commit d966449

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/zip-and-release.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ jobs:
3030
ARCHIVE_NAME="${dir%/}.tar.gz"
3131
echo "Compressing ${dir} to ${ARCHIVE_NAME}"
3232
33-
# Nén thư mục, loại trừ các file không cần thiết
34-
# tar -czvf [tên-file-output] [thư-mục-cần-nén] --exclude='[file-cần-loại-bỏ]'
33+
# Nén thư mục, loại trừ file README.md
3534
tar -czvf "${ARCHIVE_NAME}" \
36-
--exclude='.github' \
3735
--exclude='README.md' \
3836
"${dir}"
3937
done
@@ -44,16 +42,14 @@ jobs:
4442
with:
4543
repository: ${{ github.repository }}
4644
token: ${{ secrets.GITHUB_TOKEN }}
47-
45+
46+
# ===== KHỐI MÃ ĐÃ SỬA LỖI BẮT ĐẦU TỪ ĐÂY =====
4847
- name: Upload archives to latest release
4948
uses: actions/upload-release-asset@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5051
with:
5152
upload_url: ${{ steps.get_latest_release.outputs.upload_url }}
52-
asset_path: ./*.tar.gz # Upload tất cả các file .tar.gz trong thư mục gốc
53-
asset_name: ${{ matrix.asset_name }}
53+
asset_path: ./*.tar.gz # Dùng glob pattern để upload tất cả các file .tar.gz
5454
asset_content_type: application/gzip
55-
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
strategy:
58-
matrix:
59-
asset_name: ${{ toJSON(fromJSON('{"include":' + toJSON(steps.get_latest_release.outputs.assets.*.name) + '}').include) }}
55+
# ===== KẾT THÚC KHỐI MÃ SỬA LỖI =====

0 commit comments

Comments
 (0)