Initial PupNet test #1
Workflow file for this run
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: .NET Build + Publish | |
| on: | |
| push: | |
| branches: [main, ui-rewrite] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore -p:PostBuildEvent= | |
| - name: Publish Windows 64bit | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: dotnet publish --os win --arch x64 -c Release --self-contained false MSUScripter/MSUScripter.csproj | |
| - name: Publish Windows 32bit | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: dotnet publish --os win --arch x86 -c Release --self-contained false MSUScripter/MSUScripter.csproj | |
| - name: Get version number | |
| if: ${{ github.event_name != 'pull_request' }} | |
| id: version | |
| run: | | |
| $version = (Get-Item "MSUScripter\bin\Release\net9.0\win-x86\publish\MSUScripter.exe").VersionInfo.ProductVersion | |
| $version = $version.Split("+")[0] | |
| Write-Host $version | |
| Write-Output "number=$version" >> $env:GITHUB_OUTPUT | |
| shell: pwsh | |
| - name: Building the Windows installer | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: '"%programfiles(x86)%/Inno Setup 6/iscc.exe" "Setup/MSUScripter.iss"' | |
| shell: cmd | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ github.event_name != 'pull_request' }} | |
| with: | |
| path: "setup/Output/*" | |
| name: MSUScripter |