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 ffada27d..59687a23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,15 @@ name: Build Unreal Plugin -on: push -# nom, wydaje mi sie develop main tag -> jfrog, tag -> github release, wszystko inne -> build, ale dev/null +on: + push: + workflow_dispatch: env: CPP_SDK_TAG: "2.1.0" 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: @@ -17,12 +18,11 @@ jobs: matrix: version: ["4.27", "5.0"] runs-on: ["self-hosted", "X64", "macOS"] - # User matrix for 4.27.2 and 5.0.3 env: BUILD_PLATFORM: 'macos64' steps: - name: Code checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download C++ SDK release asset uses: ./.github/actions/download_cpp/bash with: @@ -37,21 +37,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 @@ -62,7 +55,7 @@ jobs: BUILD_PLATFORM: 'windows64' steps: - name: Code checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Download C++ SDK release asset id: download_cpp uses: ./.github/actions/download_cpp/powershell @@ -75,18 +68,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 - - 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."