From 98bf2ec95cae5add0e17079c9feaa0927c297e4b Mon Sep 17 00:00:00 2001 From: Eric Wang <37554696+ericwang401@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:59:02 -0400 Subject: [PATCH] Fix release.yml not adding example env --- .github/workflows/release.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0b63515667..2d05107331a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,17 @@ jobs: - name: Create Release Archive run: | - files_to_remove=( + files_to_include=( + "." + ".editorconfig" + ".env.example" + ".gitattributes" + ".gitignore" + ".prettierignore" + ".prettierrc.json" + ) + + files_to_exclude=( "node_modules/" "tests/" "CODE_OF_CONDUCT.md" @@ -36,20 +46,14 @@ jobs: "phpunit.xml" "stats.html" ) - - rm -rf "${files_to_remove[@]}" - - files_to_include=( - "." - ".editorconfig" - ".env.example" - ".gitattributes" - ".gitignore" - ".prettierignore" - ".prettierrc.json" - ) - - tar -czf panel.tar.gz "${files_to_include[@]}" + + # Build the exclude parameters for tar + exclude_params=() + for file in "${files_to_exclude[@]}"; do + exclude_params+=(--exclude="$file") + done + + tar "${exclude_params[@]}" -czf panel.tar.gz "${files_to_include[@]}" - name: Extract Changelog id: extract_changelog