v0.10.5 Fixes and Additions #88
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: Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v0.9.7 | |
| with: | |
| versionSpec: "5.x" | |
| - name: Determine Version | |
| uses: gittools/actions/gitversion/execute@v0.9.7 | |
| with: | |
| additionalArguments: '/updateprojectfiles /overrideconfig "mode=Mainline"' | |
| - name: Build (Release) | |
| run: dotnet build . --configuration Release -p:Version=$GitVersion_SemVer | |
| - name: Run Unit Tests | |
| run: dotnet test | |
| - name: Package Nuget | |
| run: dotnet pack VCF.Core --configuration Release -p:Version=$GitVersion_SemVer --output ./nuget | |
| - name: Upload a Build Artifact | |
| if: ${{ !env.ACT && github.event_name == 'push' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./nuget | |
| - name: Push to Nuget | |
| if: ${{ !env.ACT && github.event_name == 'push' }} | |
| run: dotnet nuget push ./nuget/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
| - name: GH Release | |
| uses: softprops/action-gh-release@v1 | |
| if: ${{ !env.ACT && github.event_name == 'push' }} | |
| with: | |
| body: Automatic pre-release of ${{ env.GitVersion_SemVer }} for ${{ env.GitVersion_ShortSha }} | |
| name: v${{ env.GitVersion_SemVer }} | |
| files: ./VCF.Core/bin/Debug/net6.0/VampireCommandFramework.dll | |
| fail_on_unmatched_files: true | |
| prerelease: true | |
| tag_name: v${{ env.GitVersion_SemVer }} |