From fce21c34b3215115b3e58e6c5feb117991166f77 Mon Sep 17 00:00:00 2001 From: Marek Sobolak Date: Mon, 16 Jan 2023 13:18:05 +0100 Subject: [PATCH] CCS-4399 Fix double zipped artefacts --- .github/actions/zip_artifact/bash/action.yml | 18 ---------- .../actions/zip_artifact/bash/zip_artifact.sh | 9 ----- .../zip_artifact/powershell/action.yml | 18 ---------- .../zip_artifact/powershell/zip_artifact.ps1 | 11 ------ .github/workflows/build.yml | 35 ++++++------------- 5 files changed, 11 insertions(+), 80 deletions(-) delete mode 100644 .github/actions/zip_artifact/bash/action.yml delete mode 100755 .github/actions/zip_artifact/bash/zip_artifact.sh delete mode 100644 .github/actions/zip_artifact/powershell/action.yml delete mode 100755 .github/actions/zip_artifact/powershell/zip_artifact.ps1 diff --git a/.github/actions/zip_artifact/bash/action.yml b/.github/actions/zip_artifact/bash/action.yml deleted file mode 100644 index 322ad391..00000000 --- a/.github/actions/zip_artifact/bash/action.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: 'ZipArtifact' -description: 'Zip specified artifact.' -inputs: - zip_name: - description: 'Zip file name.' - required: true - src_dir_path: - description: 'Source dir path.' - required: true -runs: - using: 'composite' - steps: - - name: Zip artifact - bash - run: | - export INPUT_ZIP_NAME=${{ inputs.zip_name }} - export INPUT_SRC_DIR_PATH=${{ inputs.src_dir_path }} - ./.github/actions/zip_artifact/bash/zip_artifact.sh - shell: bash diff --git a/.github/actions/zip_artifact/bash/zip_artifact.sh b/.github/actions/zip_artifact/bash/zip_artifact.sh deleted file mode 100755 index 1ac55acb..00000000 --- a/.github/actions/zip_artifact/bash/zip_artifact.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -e -ZIP_OBJECT=$(basename ${INPUT_SRC_DIR_PATH}) - -cd ${GITHUB_WORKSPACE}/${INPUT_SRC_DIR_PATH}/.. \ -&& zip -rq ${GITHUB_WORKSPACE}/${INPUT_ZIP_NAME} $ZIP_OBJECT \ -&& echo "Package name: ${INPUT_ZIP_NAME}" \ -&& echo "SHASUM256: $(cd ${GITHUB_WORKSPACE}/ && shasum -a 256 ${INPUT_ZIP_NAME})" \ -&& echo "C++ SDK ver.: ${CPP_SDK_TAG}" diff --git a/.github/actions/zip_artifact/powershell/action.yml b/.github/actions/zip_artifact/powershell/action.yml deleted file mode 100644 index 6ce11fc7..00000000 --- a/.github/actions/zip_artifact/powershell/action.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: 'ZipArtifact' -description: 'Zip specified artifact.' -inputs: - zip_name: - description: 'Zip file name.' - required: true - src_dir_path: - description: 'Source dir path.' - required: true -runs: - using: 'composite' - steps: - - name: Zip artifact - powershell - run: | - $Env:INPUT_ZIP_NAME = "${{ inputs.zip_name }}" - $Env:INPUT_SRC_DIR_PATH = "${{ inputs.src_dir_path }}" - ./.github/actions/zip_artifact/powershell/zip_artifact.ps1 - shell: powershell diff --git a/.github/actions/zip_artifact/powershell/zip_artifact.ps1 b/.github/actions/zip_artifact/powershell/zip_artifact.ps1 deleted file mode 100755 index a8ab232c..00000000 --- a/.github/actions/zip_artifact/powershell/zip_artifact.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -$Env:ZIP_OBJECT = (Split-Path ${Env:INPUT_SRC_DIR_PATH} -Leaf) - -cd ${Env:GITHUB_WORKSPACE}/${Env:INPUT_SRC_DIR_PATH}/.. -Compress-Archive -Path $Env:ZIP_OBJECT -DestinationPath ${Env:GITHUB_WORKSPACE}/${Env:INPUT_ZIP_NAME} - -cd $Env:GITHUB_WORKSPACE -$Env:WINDOWSSHA256 = (Get-FileHash -Algorithm SHA256 ${Env:INPUT_ZIP_NAME}).hash - -Write-Output "Package name: ${Env:INPUT_ZIP_NAME}" -Write-Output "SHASUM256: ${Env:WINDOWSSHA256} ${Env:INPUT_ZIP_NAME})" -Write-Output "C++ SDK ver.: ${Env:CPP_SDK_TAG}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 115141ab..017dd7f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,15 @@ name: Build Unreal Plugin -on: push +on: + push: + workflow_dispatch: env: CPP_SDK_TAG: "2.2.6" CPP_SDK_DESTINATION: "DolbyIO/Source/ThirdParty" CPP_SDK_URL: "https://github.com/DolbyIO/comms-sdk-cpp/releases/download" UNREAL_PLUGIN_OUTPUT: "Build/DolbyIO" - RETENTION: 8 + RETENTION: 14 jobs: build-macos: @@ -43,21 +45,14 @@ jobs: -TargetPlatforms=Mac \ -Package=$(pwd)/${{ env.UNREAL_PLUGIN_OUTPUT }} \ -StrictIncludes - - name: Zipping DolbIO Plugin - uses: ./.github/actions/zip_artifact/bash - with: - zip_name: "DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip" - src_dir_path: ${{ env.UNREAL_PLUGIN_OUTPUT }} - name: Archive DolbyIO Plugin - if: contains(fromJson('["refs/heads/main", "refs/heads/develop", "refs/tags"]'), github.ref) + if: contains(fromJson('["refs/heads/main", "refs/heads/develop", "refs/tags/v"]'), github.ref) uses: actions/upload-artifact@v3 with: - name: DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip - path: ./DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip + name: DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }} + path: ${{ env.UNREAL_PLUGIN_OUTPUT }} retention-days: ${{ env.RETENTION }} - - name: Create GitHub release - run: | - echo "Create GitHub release only for tag." + build-windows: strategy: fail-fast: false @@ -81,18 +76,10 @@ jobs: Write-Output "UE_${{ matrix.version }}" $UERunUAT = "C:\\Program Files\\Epic Games\\UE_${{ matrix.version }}\\Engine\\Build\\BatchFiles\\RunUAT.bat" & $UERunUAT BuildPlugin -Rocket -Plugin="$(pwd)\\DolbyIO\\DolbyIO.uplugin" -TargetPlatforms=Win64 -Package="$(pwd)\\Build\\DolbyIO" -StrictIncludes -VS2019 -NoTurnKeyVariables - - name: Zipping DolbyIO Plugin - uses: ./.github/actions/zip_artifact/powershell - with: - zip_name: "DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip" - src_dir_path: ${{ env.UNREAL_PLUGIN_OUTPUT }} - name: Archive DolbyIO Plugin - if: contains(fromJson('["refs/heads/main", "refs/heads/develop", "refs/tags"]'), github.ref) + if: contains(fromJson('["refs/heads/main", "refs/heads/develop", "refs/tags/v"]'), github.ref) uses: actions/upload-artifact@v3 with: - name: DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip - path: ./DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }}.zip + name: DolbyIO_UnrealPlugin_${{ matrix.version }}_${{ env.BUILD_PLATFORM }} + path: ${{ env.UNREAL_PLUGIN_OUTPUT }} retention-days: ${{ env.RETENTION }} - - name: Create GitHub release - run: | - Write-Output "Create GitHub release only for tag."