feat: QoL improvements #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows Build and Hash Update | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-hash: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up MSBuild | |
| uses: microsoft/setup-msbuild@v1 | |
| - name: Build Solution (x86) | |
| run: msbuild AnarchyInjector.sln /p:Configuration=Release /p:Platform=x86 | |
| - name: Build Solution (x64) | |
| run: msbuild AnarchyInjector.sln /p:Configuration=Release /p:Platform=x64 | |
| - name: Generate MD5 Hash (x86) | |
| shell: powershell | |
| run: | | |
| $exePath = "Release\\AnarchyInjector_x86.exe" | |
| $md5 = Get-FileHash $exePath -Algorithm MD5 | Select-Object -ExpandProperty Hash | |
| echo "MD5 Hash (x86): $md5" | |
| - name: Generate MD5 Hash (x64) | |
| shell: powershell | |
| run: | | |
| $exePath = "x64\\Release\\AnarchyInjector_x64.exe" | |
| $md5 = Get-FileHash $exePath -Algorithm MD5 | Select-Object -ExpandProperty Hash | |
| echo "MD5 Hash (x64): $md5" | |
| - name: Get hash commit | |
| shell: powershell | |
| run: | | |
| $ARTIFACT_HASH=git rev-parse --short HEAD | |
| echo "ARTIFACT_HASH=$ARTIFACT_HASH" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| - name: Upload Build Artifact (x86) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AnarchyInjector-x86 | |
| path: Release/AnarchyInjector_x86.exe | |
| - name: Upload Build Artifact (x64) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AnarchyInjector-x64 | |
| path: x64/Release/AnarchyInjector_x64.exe | |
| - name: Release | |
| id: release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| body: | | |
| Automatic pre-release created by GitHub Actions | |
| name: "Nightly Build ${{ env.ARTIFACT_HASH }}" | |
| tag: "prerelease-${{ env.ARTIFACT_HASH }}" | |
| prerelease: true | |
| artifacts: "x64/Release/AnarchyInjector_x64.exe,Release/AnarchyInjector_x86.exe" |