Merge pull request #68 from Nebula-Developer/dependabot/nuget/testing… #24
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
| # Credit to Andrew Craven for the original version of this file | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+-[a-z]+' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set VERSION variable from tag | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
| - name: Add Natsu package to Templates | |
| run: dotnet add Natsu.Templates/content/NatsuApp package Natsu -n --version ${VERSION} | |
| - name: Add Natsu.Desktop package to Templates.Desktop | |
| run: dotnet add Natsu.Templates/content/NatsuApp.Desktop package Natsu.Desktop -n --version ${VERSION} | |
| - name: Build | |
| run: dotnet build --configuration Release /p:Version=${VERSION} | |
| - name: Test | |
| run: dotnet test --configuration Release /p:Version=${VERSION} --no-build | |
| - name: Pack | |
| run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output . | |
| - name: Push | |
| run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_API_KEY} | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} |