2.12.18 #20
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: release build | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: ./global.json | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v0 | |
| with: | |
| versionSpec: '5.x' | |
| - name: Determine Version | |
| uses: gittools/actions/gitversion/execute@v0 | |
| - name: Development Build Check | |
| if: "!github.event.release.prerelease" | |
| shell: pwsh | |
| run: | | |
| if ($env:GitVersion_CommitsSinceVersionSource -ne "0") { | |
| Write-Output "::error:: This is a development build and should not be released. Did you forget to create a new tag for the release?" | |
| exit 1 | |
| } | |
| - name: Build | |
| run: ./Scripts/build.ps1 | |
| shell: pwsh | |
| - name: Zip Artifact | |
| run: 7z a -t7z -mx=9 -m0=lzma2 -ms=on -r -- ${{ format('xna-cncnet-client-{0}.7z', env.GitVersion_SemVer) }} ./Compiled/* | |
| shell: pwsh | |
| - name: Upload Final Artifact to the Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| append_body: true | |
| files: ${{ format('xna-cncnet-client-{0}.7z', env.GitVersion_SemVer) }} |