From b0af8ba2ef3498f2d732737c68e9fabdd105f43e Mon Sep 17 00:00:00 2001 From: Belonit <54427022+Belonit@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:28:42 +0300 Subject: [PATCH] update workflows --- .github/actions/build/action.yml | 11 +++++++++++ .github/workflows/nightly-build.yml | 25 ++----------------------- .github/workflows/pr-nightly-build.yml | 26 +++----------------------- .github/workflows/release-build.yml | 2 ++ 4 files changed, 18 insertions(+), 46 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index b1ac7d4c..ebbf6365 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -32,3 +32,14 @@ runs: # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference run: msbuild /m /p:Configuration=${{inputs.build-config}} /p:GitCommit=${{github.sha}} /p:GitBranch=${{github.ref}} ${{inputs.sln-path}} shell: cmd + + - name: Upload Artifact + if: ${{ success() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact-name }} + path: | + ${{inputs.sln-path}}/${{inputs.build-config}}/cncnet5.dll + ${{inputs.sln-path}}/${{inputs.build-config}}/cncnet5.pdb + ./LICENSE.md + ./README.md diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index e1c85662..ef11f4f9 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -24,32 +24,11 @@ jobs: with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }} + artifact-name: compiled-dll-regular-${{ github.sha }} - name: Build HardEnd uses: ./.github/actions/build with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd - - - name: Create Artifact - run: | - mkdir ./artifact - mkdir ./artifact/Regular - copy ./LICENSE.md ./artifact/Regular/LICENSE.md - copy ./README.md ./artifact/Regular/README.md - copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.pdb ./artifact/Regular/cncnet5.pdb - copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.dll ./artifact/Regular/cncnet5.dll - mkdir ./artifact/HardEnd - copy ./LICENSE.md ./artifact/HardEnd/LICENSE.md - copy ./README.md ./artifact/HardEnd/README.md - copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.pdb" ./artifact/HardEnd/cncnet5.pdb - copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.dll" ./artifact/HardEnd/cncnet5.dll - 7z a ${{ env.ARTIFACT_NAME }} ./artifact/* - - - name: Upload Artifact - if: ${{ success() }} - uses: actions/upload-artifact@v4 - with: - compression-level: 0 - name: ${{ inputs.artifact-name }} - path: ${{ env.ARTIFACT_NAME }} + artifact-name: compiled-dll-hardend-${{ github.sha }} diff --git a/.github/workflows/pr-nightly-build.yml b/.github/workflows/pr-nightly-build.yml index 1cfb7f2a..a7c10bbc 100644 --- a/.github/workflows/pr-nightly-build.yml +++ b/.github/workflows/pr-nightly-build.yml @@ -6,6 +6,7 @@ on: env: SOLUTION_PATH: . BUILD_CONFIGURATION: DevBuild + ARTIFACT_NAME: cncnet5_${{ github.ref_name }}.zip jobs: build: @@ -21,32 +22,11 @@ jobs: with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }} + artifact-name: compiled-dll-regular-${{ github.sha }} - name: Build HardEnd uses: ./.github/actions/build with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd - - - name: Create Artifact - run: | - mkdir ./artifact - mkdir ./artifact/Regular - copy ./LICENSE.md ./artifact/Regular/LICENSE.md - copy ./README.md ./artifact/Regular/README.md - copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.pdb ./artifact/Regular/cncnet5.pdb - copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.dll ./artifact/Regular/cncnet5.dll - mkdir ./artifact/HardEnd - copy ./LICENSE.md ./artifact/HardEnd/LICENSE.md - copy ./README.md ./artifact/HardEnd/README.md - copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.pdb" ./artifact/HardEnd/cncnet5.pdb - copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.dll" ./artifact/HardEnd/cncnet5.dll - 7z a ${{ env.ARTIFACT_NAME }} ./artifact/* - - - name: Upload Artifact - if: ${{ success() }} - uses: actions/upload-artifact@v4 - with: - compression-level: 0 - name: ${{ inputs.artifact-name }} - path: ${{ env.ARTIFACT_NAME }} + artifact-name: compiled-dll-hardend-${{ github.sha }} diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index a17a7b31..a1afe0fc 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -26,12 +26,14 @@ jobs: with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }} + artifact-name: compiled-dll-regular-${{ github.sha }} - name: Build HardEnd uses: ./.github/actions/build with: sln-path: ${{ env.SOLUTION_PATH }} build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd + artifact-name: compiled-dll-hardend-${{ github.sha }} - name: Create Archive For Release run: |