Update MonoGame a release scripts #5
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 library to NuGet | |
| on: | |
| push: | |
| tags: | |
| - 'library/v*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get version from tag | |
| run: | | |
| TAGVERSION=$(git describe --tags --abbrev=0) | |
| TAGVERSION=${TAGVERSION#*/} | |
| echo "TAGVERSION=${TAGVERSION:1}" >> $GITHUB_ENV | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Pack library with dotnet | |
| run: dotnet pack Templates/Library --output nuget-packages-library --configuration Release -p:PackageVersion=${{ env.TAGVERSION }} | |
| - name: Push library with dotnet | |
| run: dotnet nuget push nuget-packages-library/*.nupkg --api-key ${{ secrets.NUGETAPIKEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |