These new features are for v1.1.0 #16
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| id-token: write # Required for OIDC authentication to NuGet.org | |
| jobs: | |
| build-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "9.0.x" | |
| - name: Restore | |
| run: dotnet restore FunctionalStateMachine.sln | |
| - name: Build | |
| run: dotnet build FunctionalStateMachine.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test FunctionalStateMachine.sln --configuration Release --no-build --verbosity normal | |
| - name: Set Version | |
| run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV | |
| - name: Pack | |
| run: | | |
| dotnet pack src/FunctionalStateMachine.Core/FunctionalStateMachine.Core.csproj --configuration Release --no-build --output ./artifacts --include-symbols --include-source /p:PackageVersion=${VERSION} | |
| dotnet pack src/FunctionalStateMachine.CommandRunner/FunctionalStateMachine.CommandRunner.csproj --configuration Release --no-build --output ./artifacts --include-symbols --include-source /p:PackageVersion=${VERSION} | |
| dotnet pack src/FunctionalStateMachine.Diagrams/FunctionalStateMachine.Diagrams.csproj --configuration Release --no-build --output ./artifacts /p:PackageVersion=${VERSION} /p:IncludeSymbols=false | |
| - name: NuGet login (Trusted Publishing) | |
| uses: NuGet/login@v1 | |
| id: nuget-login | |
| with: | |
| user: ${{ secrets.NUGET_USERNAME }} # Your NuGet.org username (not email) | |
| - name: Push to NuGet.org | |
| run: | | |
| dotnet nuget push ./artifacts/*.nupkg \ | |
| --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} \ | |
| --source https://api.nuget.org/v3/index.json \ | |
| --skip-duplicate | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ./artifacts/*.nupkg | |
| ./artifacts/*.snupkg | |
| generate_release_notes: true |