Skip to content

Commit

Permalink
Fix GitHub Actions CI after last commit
Browse files Browse the repository at this point in the history
Also updates Actions to add commit hash and branch to artifact names
  • Loading branch information
Sparronator9999 committed Jul 25, 2024
1 parent 8a39e42 commit 3cccad9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v1

- name: Get short commit hash for environment variable
run: |
echo "sha_short=$(git rev-parse --short "${{ github.sha }}")" >> "$GITHUB_ENV"
- name: Setup MSBuild path
uses: microsoft/setup-msbuild@v2

Expand All @@ -39,14 +43,14 @@ jobs:
run: msbuild.exe /t:restore /p:RestoreLockedMode=true

- name: Build solution
run: msbuild.exe MSIFanControl.sln /nologo /nr:false /p:DeployOnBuild=true /p:platform="Any CPU" /p:configuration="${{ matrix.config }}"
run: msbuild.exe YAMDCC.sln /nologo /nr:false /p:DeployOnBuild=true /p:platform="Any CPU" /p:configuration="${{ matrix.config }}"

- name: Copy fan configs to build path
run: mkdir MSIFanControl.GUI\bin\${{ matrix.config }}\net48\Configs && copy Configs\* MSIFanControl.GUI\bin\${{ matrix.config }}\net48\Configs
run: mkdir YAMDCC.GUI\bin\${{ matrix.config }}\net48\Configs && copy Configs\* YAMDCC.GUI\bin\${{ matrix.config }}\net48\Configs

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: "MSIFanControl-${{ matrix.config }}"
path: "./MSIFanControl.GUI/bin/${{ matrix.config }}/net48/"
name: "YAMDCC-${{ github.ref_name }}-${{ env.sha_short }}-${{ matrix.config }}"
path: "./YAMDCC.GUI/bin/${{ matrix.config }}/net48/"
compression-level: 9

0 comments on commit 3cccad9

Please sign in to comment.