Merge pull request #40 from Conspiratio/feature/player-setup-manager #43
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: Push - Build and publish Lib | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v1 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v1 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v2 | |
| with: | |
| nuget-api-key: ${{secrets.NUGET_API_KEY}} | |
| nuget-version: 'latest' | |
| - name: Restore NuGet Packages | |
| run: nuget restore Conspiratio.Lib.sln | |
| - name: Build | |
| run: msbuild Conspiratio.Lib.sln /p:Configuration=Release | |
| - name: Pack | |
| run: msbuild Conspiratio.Lib.sln /p:Configuration=Release -t:pack | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Conspiratio.Lib | |
| path: | | |
| Conspiratio.Lib\bin\Release\netstandard2.0\* | |
| Conspiratio.Lib\bin\Release\*.nupkg | |
| - name: Publish the package to nuget.org | |
| run: nuget push Conspiratio.Lib\bin\Release\*.nupkg ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json -SkipDuplicate | |
| - name: Get Version from csproj file | |
| id: get-version | |
| uses: kzrnm/get-net-sdk-project-versions-action@v2 | |
| with: | |
| proj-path: Conspiratio.Lib\Conspiratio.Lib.csproj | |
| - name: Create release text with changelog link | |
| run: | | |
| $version = "${{steps.get-version.outputs.assembly-version}}" | |
| $version = $version.Replace(".","") | |
| $text = "Changelog: https://github.com/Conspiratio/Conspiratio.Lib/blob/master/CHANGELOG.md#"+$version | |
| echo "VERSION_TEXT=${text}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@v1.14.0 | |
| with: | |
| artifacts: 'Conspiratio.Lib\bin\Release\*,Conspiratio.Lib\bin\Release\*.nupkg' | |
| body: ${{env.VERSION_TEXT}} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit: master | |
| tag: ${{ steps.get-version.outputs.assembly-version }} |