Skip to content

Commit

Permalink
Update msbuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
illusion0001 authored Jan 24, 2025
1 parent c36f211 commit 3707f47
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
CONFIGURATION: RelWithDebInfo
INSTALL_CONFIGURATION: ${{ github.workspace }}/out/install
DLL_OUT: x64_lib
WANT_RELEASE: true
permissions:
contents: write
steps:
Expand All @@ -43,16 +42,16 @@ jobs:
echo "folder=$cmdOutput" >> "$Env:GITHUB_ENV"
echo "BUILD_CONFIGURATION=${{ github.workspace }}/out/build/${{ env.BUILD_PRESET }}" >> "$Env:GITHUB_ENV"
$push = "false"
$pr = $push
$pr = "true"
if ("${{ github.event_name }}" -ieq "push")
{
$push = "true"
}
if ( "${{ github.event_name }}" -ieq "pull_request")
{
$pr = "true"
$pr = "false"
}
echo "IS_PR=$pr" >> "$Env:GITHUB_ENV"
echo "WANT_RELEASE=$pr" >> "$Env:GITHUB_ENV"
echo "IS_PUSH=$push" >> "$Env:GITHUB_ENV"
echo "BRANCH=$branch" >> "$Env:GITHUB_ENV"
- name: Add MSBuild to PATH
Expand Down Expand Up @@ -127,7 +126,7 @@ jobs:
!${{ env.INSTALL_CONFIGURATION }}/${{ env.DLL_OUT }}/**/*.pdb
${{ env.INSTALL_CONFIGURATION }}/hashes.txt
- name: Prepare Release
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true' && env.IS_PR == 'false'
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true'
run: |
$hashMarkdown = @'
Expand Down Expand Up @@ -160,7 +159,7 @@ jobs:
7z a -mx9 -mtm- "${{ env.zip_file }}" ${{ env.INSTALL_CONFIGURATION }}\${{ env.DLL_OUT }}
7z a -mx9 -mtm- "${{ env.zip_file }}" ${{ env.INSTALL_CONFIGURATION }}\hashes.txt
- name: Branch Check
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true' && env.IS_PR == 'false'
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true'
run: |
$prerelease = ""
if ("${{ env.BRANCH }}" -ieq "main")
Expand All @@ -175,7 +174,7 @@ jobs:
}
echo "prerelease=$prerelease" >> $Env:GITHUB_ENV
- name: Create Release
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true' && env.IS_PR == 'false'
if: env.WANT_RELEASE == 'true' && env.IS_PUSH == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: '& gh release create ${{ env.commit_ver }} "${{ env.zip_file_pdb }}" "${{ env.zip_file }}" --target ${{ GITHUB.SHA }} -t "${{ env.commit_ver }}" -F hash.md${{ env.prerelease }}'

0 comments on commit 3707f47

Please sign in to comment.