Skip to content

Commit 084a254

Browse files
committed
it works now For Real
1 parent 7f3cef9 commit 084a254

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

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

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,17 @@ jobs:
7474
- name: Download artifacts
7575
uses: actions/download-artifact@v4
7676

77-
- name: Archive artifacts
77+
- name: Zip it up
7878
shell: bash
7979
run: |
80-
# Find the artifact directory and copy its contents to create proper structure (i want it to be zip/addons/sourcemod/* so i'll just do it the complicated way)
81-
artifact_dir=$(find * -maxdepth 0 -type d | head -n 1)
82-
zip -rq "$artifact_dir.zip" "$artifact_dir"
83-
mkdir -p temp_extract
84-
cd temp_extract
85-
unzip -q "../$artifact_dir.zip"
80+
artifact_dir=$(find * -maxdepth 0 -type d -name "offstyle-database-*" | head -n 1)
81+
zip_name="offstyle-database-${{ github.ref_name }}.zip"
8682
cd "$artifact_dir"
87-
zip -rq "../../$artifact_dir.zip" addons/
88-
cd ../..
89-
rm -rf temp_extract
90-
echo "zip_file=$artifact_dir.zip" >> $GITHUB_ENV
83+
mkdir -p addons
84+
mv sourcemod addons/
85+
zip -rq "../$zip_name" addons/
86+
cd ..
87+
echo "zip_file=$zip_name" >> $GITHUB_ENV
9188
9289
- name: Generate changelog
9390
id: changelog
@@ -154,16 +151,17 @@ jobs:
154151
- name: Download artifacts
155152
uses: actions/download-artifact@v4
156153

157-
- name: Create clean zip file
154+
- name: Create Discord zip
158155
shell: bash
159156
run: |
160-
# Find the artifact directory and extract the addons folder
161-
artifact_dir=$(find * -maxdepth 0 -type d | head -n 1)
162-
# Create a clean zip with proper addons/ structure using original artifact name
157+
artifact_dir=$(find * -maxdepth 0 -type d -name "offstyle-database-*" | head -n 1)
158+
zip_name="offstyle-database-${{ github.ref_name }}.zip"
163159
cd "$artifact_dir"
164-
zip -rq "../$artifact_dir.zip" addons/
160+
mkdir -p addons
161+
mv sourcemod addons/
162+
zip -rq "../$zip_name" addons/
165163
cd ..
166-
echo "zip_file=$artifact_dir.zip" >> $GITHUB_ENV
164+
echo "zip_file=$zip_name" >> $GITHUB_ENV
167165
168166
- name: Get commit list
169167
id: commits

0 commit comments

Comments
 (0)