Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Belonit committed Mar 27, 2024
1 parent ca03b09 commit b0af8ba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 46 deletions.
11 changes: 11 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 2 additions & 23 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
26 changes: 3 additions & 23 deletions .github/workflows/pr-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
SOLUTION_PATH: .
BUILD_CONFIGURATION: DevBuild
ARTIFACT_NAME: cncnet5_${{ github.ref_name }}.zip

jobs:
build:
Expand All @@ -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 }}
2 changes: 2 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit b0af8ba

Please sign in to comment.