Skip to content

Commit

Permalink
fix: Stop manually zipping sources, archiver does it
Browse files Browse the repository at this point in the history
  • Loading branch information
kirre-bylund committed Nov 11, 2024
1 parent 5993497 commit 62a0059
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/unreal-sdk-packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ jobs:
SDK_NAME=`find "$SDK_PATH" -type f -name "*.uplugin" | sed -n -r "s/.*\/([-A-Za-z0-9_]+)\.uplugin/\1/p"`
SDK_VERSION=`sed -n -r 's/^ +\"VersionName\": \"([0-9]+.[0-9]+.[0-9]+)\",/\1/p' < "$SDK_PATH/$SDK_NAME/$SDK_NAME.uplugin"`
sed -i -r "s/^( +)(\"VersionName\": \"[0-9\.]+\",)/\1\2\n\1\"EngineVersion\": \"${{ matrix.UE_VERSION }}\",/g" "$SDK_PATH/$SDK_NAME/$SDK_NAME.uplugin"
CURRENT_PACKAGE_DIR="Packaged"
CURRENT_PACKAGE_DIR="/home/runner/work/Packaged"
echo "PACKAGE_DIR=${CURRENT_PACKAGE_DIR}" >> $GITHUB_ENV
rm -rf "$CURRENT_PACKAGE_DIR"
mkdir -p "$CURRENT_PACKAGE_DIR"
PACKAGE_NAME="${SDK_NAME}v${SDK_VERSION}_for_Unreal_Engine_${{ matrix.UE_VERSION }}.zip"
PACKAGE_NAME="${SDK_NAME}v${SDK_VERSION}_for_Unreal_Engine_${{ matrix.UE_VERSION }}"
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV
tar -a -cf "$CURRENT_PACKAGE_DIR/$PACKAGE_NAME" -C "$SDK_PATH" "$SDK_NAME"
cp -r "$SDK_PATH/$SDK_NAME" "$CURRENT_PACKAGE_DIR/$SDK_NAME"
echo " Package $PACKAGE_NAME produced to path $CURRENT_PACKAGE_DIR"
- name: Expose packaged artifact
uses: actions/upload-artifact@v4
with:
name: ${{ ENV.PACKAGE_NAME }}
path: ${{ ENV.PACKAGE_DIR }}/${{ ENV.PACKAGE_NAME }}
path: ${{ ENV.PACKAGE_DIR }}

- name: Package SDKs with Outdated Engine Version Warning
if: ${{ contains(fromJSON(VARS.OUTDATED_ENGINE_VERSIONS), matrix.UE_VERSION) }}
Expand All @@ -52,17 +53,18 @@ jobs:
SDK_NAME=`find "$SDK_PATH" -type f -name "*.uplugin" | sed -n -r "s/.*\/([-A-Za-z0-9_]+)\.uplugin/\1/p"`
SDK_VERSION=`sed -n -r 's/^ +\"VersionName\": \"([0-9]+.[0-9]+.[0-9]+)\",/\1/p' < "$SDK_PATH/$SDK_NAME/$SDK_NAME.uplugin"`
sed -i -r "s/bool bShowOutdatedSDKMessage = false/bool bShowOutdatedSDKMessage = true/g" "$SDK_PATH/$SDK_NAME/Source/$SDK_NAME/$SDK_NAME.Build.cs"
CURRENT_PACKAGE_DIR="Packaged"
CURRENT_PACKAGE_DIR="/home/runner/work/Packaged"
echo "PACKAGE_DIR=${CURRENT_PACKAGE_DIR}" >> $GITHUB_ENV
rm -rf "$CURRENT_PACKAGE_DIR"
mkdir -p "$CURRENT_PACKAGE_DIR"
PACKAGE_NAME="${SDK_NAME}v${SDK_VERSION}_for_Unreal_Engine_${{ matrix.UE_VERSION }}_with_outdated_version_warning.zip"
PACKAGE_NAME="${SDK_NAME}v${SDK_VERSION}_for_Unreal_Engine_${{ matrix.UE_VERSION }}_with_outdated_version_warning"
echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV
tar -a -cf "$CURRENT_PACKAGE_DIR/$PACKAGE_NAME" -C "$SDK_PATH" "$SDK_NAME"
cp -r "$SDK_PATH/$SDK_NAME" "$CURRENT_PACKAGE_DIR/$SDK_NAME"
echo " Package $PACKAGE_NAME produced to path $CURRENT_PACKAGE_DIR"
- name: Expose packaged artifact with outdated engine version warning
if: ${{ contains(fromJSON(VARS.OUTDATED_ENGINE_VERSIONS), matrix.UE_VERSION) }}
uses: actions/upload-artifact@v4
with:
name: ${{ ENV.PACKAGE_NAME }}
path: ${{ ENV.PACKAGE_DIR }}/${{ ENV.PACKAGE_NAME }}
path: ${{ ENV.PACKAGE_DIR }}

0 comments on commit 62a0059

Please sign in to comment.