Skip to content

Commit b0af8ba

Browse files
committed
update workflows
1 parent ca03b09 commit b0af8ba

File tree

4 files changed

+18
-46
lines changed

4 files changed

+18
-46
lines changed

.github/actions/build/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,14 @@ runs:
3232
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
3333
run: msbuild /m /p:Configuration=${{inputs.build-config}} /p:GitCommit=${{github.sha}} /p:GitBranch=${{github.ref}} ${{inputs.sln-path}}
3434
shell: cmd
35+
36+
- name: Upload Artifact
37+
if: ${{ success() }}
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: ${{ inputs.artifact-name }}
41+
path: |
42+
${{inputs.sln-path}}/${{inputs.build-config}}/cncnet5.dll
43+
${{inputs.sln-path}}/${{inputs.build-config}}/cncnet5.pdb
44+
./LICENSE.md
45+
./README.md

.github/workflows/nightly-build.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,11 @@ jobs:
2424
with:
2525
sln-path: ${{ env.SOLUTION_PATH }}
2626
build-config: ${{ env.BUILD_CONFIGURATION }}
27+
artifact-name: compiled-dll-regular-${{ github.sha }}
2728

2829
- name: Build HardEnd
2930
uses: ./.github/actions/build
3031
with:
3132
sln-path: ${{ env.SOLUTION_PATH }}
3233
build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd
33-
34-
- name: Create Artifact
35-
run: |
36-
mkdir ./artifact
37-
mkdir ./artifact/Regular
38-
copy ./LICENSE.md ./artifact/Regular/LICENSE.md
39-
copy ./README.md ./artifact/Regular/README.md
40-
copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.pdb ./artifact/Regular/cncnet5.pdb
41-
copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.dll ./artifact/Regular/cncnet5.dll
42-
mkdir ./artifact/HardEnd
43-
copy ./LICENSE.md ./artifact/HardEnd/LICENSE.md
44-
copy ./README.md ./artifact/HardEnd/README.md
45-
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.pdb" ./artifact/HardEnd/cncnet5.pdb
46-
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.dll" ./artifact/HardEnd/cncnet5.dll
47-
7z a ${{ env.ARTIFACT_NAME }} ./artifact/*
48-
49-
- name: Upload Artifact
50-
if: ${{ success() }}
51-
uses: actions/upload-artifact@v4
52-
with:
53-
compression-level: 0
54-
name: ${{ inputs.artifact-name }}
55-
path: ${{ env.ARTIFACT_NAME }}
34+
artifact-name: compiled-dll-hardend-${{ github.sha }}

.github/workflows/pr-nightly-build.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
env:
77
SOLUTION_PATH: .
88
BUILD_CONFIGURATION: DevBuild
9+
ARTIFACT_NAME: cncnet5_${{ github.ref_name }}.zip
910

1011
jobs:
1112
build:
@@ -21,32 +22,11 @@ jobs:
2122
with:
2223
sln-path: ${{ env.SOLUTION_PATH }}
2324
build-config: ${{ env.BUILD_CONFIGURATION }}
25+
artifact-name: compiled-dll-regular-${{ github.sha }}
2426

2527
- name: Build HardEnd
2628
uses: ./.github/actions/build
2729
with:
2830
sln-path: ${{ env.SOLUTION_PATH }}
2931
build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd
30-
31-
- name: Create Artifact
32-
run: |
33-
mkdir ./artifact
34-
mkdir ./artifact/Regular
35-
copy ./LICENSE.md ./artifact/Regular/LICENSE.md
36-
copy ./README.md ./artifact/Regular/README.md
37-
copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.pdb ./artifact/Regular/cncnet5.pdb
38-
copy ./${{ env.BUILD_CONFIGURATION }}/cncnet5.dll ./artifact/Regular/cncnet5.dll
39-
mkdir ./artifact/HardEnd
40-
copy ./LICENSE.md ./artifact/HardEnd/LICENSE.md
41-
copy ./README.md ./artifact/HardEnd/README.md
42-
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.pdb" ./artifact/HardEnd/cncnet5.pdb
43-
copy "./${{ env.BUILD_CONFIGURATION }}-HardEnd/cncnet5.dll" ./artifact/HardEnd/cncnet5.dll
44-
7z a ${{ env.ARTIFACT_NAME }} ./artifact/*
45-
46-
- name: Upload Artifact
47-
if: ${{ success() }}
48-
uses: actions/upload-artifact@v4
49-
with:
50-
compression-level: 0
51-
name: ${{ inputs.artifact-name }}
52-
path: ${{ env.ARTIFACT_NAME }}
32+
artifact-name: compiled-dll-hardend-${{ github.sha }}

.github/workflows/release-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ jobs:
2626
with:
2727
sln-path: ${{ env.SOLUTION_PATH }}
2828
build-config: ${{ env.BUILD_CONFIGURATION }}
29+
artifact-name: compiled-dll-regular-${{ github.sha }}
2930

3031
- name: Build HardEnd
3132
uses: ./.github/actions/build
3233
with:
3334
sln-path: ${{ env.SOLUTION_PATH }}
3435
build-config: ${{ env.BUILD_CONFIGURATION }}-HardEnd
36+
artifact-name: compiled-dll-hardend-${{ github.sha }}
3537

3638
- name: Create Archive For Release
3739
run: |

0 commit comments

Comments
 (0)