clarify change #37
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
| ## NOTE: if you rename this file, make sure the badge link | |
| ## in README.md also points to the new filename. | |
| ## https://github.com/ssg/SimpleBase/blob/f970bc70336822c00a8353e37023e5d9869952b9/README.md?plain=1#L4 | |
| name: Build, Test, and Deploy | |
| on: [push, release, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build | |
| run: dotnet build --configuration Release | |
| - name: Run tests | |
| run: dotnet test --no-build --configuration Release | |
| - name: NuGet login | |
| uses: NuGet/login@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: login | |
| with: | |
| user: ${{secrets.NUGET_USER}} | |
| - name: Pack | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: dotnet pack src --no-build --configuration Release --output ./nupkg | |
| - name: Publish to NuGet | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: dotnet nuget push ./nupkg/*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{steps.login.NUGET_API_KEY}} | |