Merge pull request #78 from jongalloway/docs/dnx-cli-guidance #4
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build-test-pack-publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| UPDATE_SNAPSHOTS: "0" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| dotnet-version: 10.0.x | |
| - name: Restore | |
| run: dotnet restore DiagramForge.slnx | |
| - name: Build | |
| run: dotnet build DiagramForge.slnx --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test DiagramForge.slnx --configuration Release --no-build | |
| - name: Pack Library | |
| run: dotnet pack src/DiagramForge/DiagramForge.csproj --configuration Release --no-build --no-restore -o artifacts/nupkg | |
| - name: Pack CLI Tool | |
| run: dotnet pack src/DiagramForge.Cli/DiagramForge.Cli.csproj --configuration Release --no-build --no-restore -o artifacts/nupkg | |
| - name: NuGet Login | |
| id: login | |
| uses: NuGet/login@v1 | |
| with: | |
| user: ${{ secrets.NUGET_USER }} | |
| - name: Publish Packages | |
| run: dotnet nuget push artifacts/nupkg/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |