Skip to content

Commit

Permalink
Fix Release Asset Folder Struct (#17)
Browse files Browse the repository at this point in the history
* Delete build.py

* Update README.md

* add git credentials for bot

* Update build.yml

* change folderstruct for release assets

* Update create_release.yml
  • Loading branch information
Gogoshika-ga authored Oct 18, 2024
1 parent 3f7085c commit d2c8629
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,33 @@ jobs:
with:
path: ./release-artifacts

- name: Show downloaded artifacts
run: ls -l ./release-artifacts
- name: Organize release files
run: |
# Create the base include directory in the final release
mkdir -p ./final-release/include
# Copy the entire include directory from one of the platform folders (assuming they are the same across platforms)
cp -r ./release-artifacts/ga-cpp-sdk-macOS-latest-clang-Release/include/* ./final-release/include/

# Dynamically find all platform directories
platform_dirs=$(find ./release-artifacts -mindepth 1 -maxdepth 1 -type d)

# Iterate over each platform directory and copy the respective binaries
for platform in $platform_dirs; do
platform_name=$(basename $platform)
mkdir -p ./final-release/$platform_name
if [[ $platform_name == *"windows"* ]]; then
cp $platform/*.lib ./final-release/$platform_name/
else
cp $platform/*.a ./final-release/$platform_name/
fi
done

# Create a zip archive of the final-release directory
zip -r ga-sdk-release-${{ inputs.tag_name }}.zip ./final-release

- name: Show organized release files
run: tree ./final-release

- name: Create release
uses: softprops/[email protected]
Expand All @@ -52,4 +77,4 @@ jobs:
name: Release GA-CPP-SDK ${{ inputs.tag_name }}
generate_release_notes: true
make_latest: true
files: ./release-artifacts/*
files: ga-sdk-release-${{ inputs.tag_name }}.zip

0 comments on commit d2c8629

Please sign in to comment.