fix(build): GlobalUsings.cs fuer Akka root + Akka.Persistence + Akka.… #3
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*'] | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_NOLOGO: true | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| # Job-level env damit das Secret in step-level `if:`-Ausdruecken sichtbar | |
| # ist (der `secrets`-Context ist dort nicht direkt verfuegbar). Empty | |
| # string wenn nicht gesetzt → `env.X != ''`-Gates skippen sauber. | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Configure NuGet auth | |
| run: > | |
| dotnet nuget update source github | |
| --username ${{ github.actor }} | |
| --password ${{ secrets.KUESTENLOGIK_PACKAGES_TOKEN || secrets.GITHUB_TOKEN }} | |
| --store-password-in-clear-text | |
| --configfile nuget.config | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT | |
| - name: Restore | |
| run: dotnet restore Akka.Surgewave.slnx | |
| - name: Build & Test | |
| run: | | |
| dotnet build Akka.Surgewave.slnx -c Release --no-restore -p:Version=${{ steps.version.outputs.VERSION }} | |
| # Akka.Persistence-TCK + EndToEnd-Tests brauchen einen Surgewave-Broker. | |
| # Filter via FullyQualifiedName so dass Release-Tags nicht blocken. | |
| # main-CI laesst die Specs in einem separaten Testcontainers-Job | |
| # laufen (folgt). | |
| dotnet test Akka.Surgewave.slnx -c Release --no-build -v normal --filter "FullyQualifiedName!~Spec&FullyQualifiedName!~EndToEnd" | |
| - name: Pack NuGet | |
| run: dotnet pack Akka.Surgewave.slnx -c Release --no-build -o artifacts/packages -p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: Publish NuGet to GitHub Packages | |
| if: ${{ !contains(github.ref, '-rc') }} | |
| run: dotnet nuget push "artifacts/packages/*.nupkg" --source "https://nuget.pkg.github.com/Kuestenlogik/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | |
| # nuget.org: nur GA-Tags (kein `-rc`), nur wenn Secret konfiguriert. | |
| # Apache-2.0 → public-pushbar. NUGET_API_KEY braucht den 'Push new | |
| # packages and package versions'-Scope mit Glob | |
| # `Kuestenlogik.Surgewave.Akka*` (deckt AkkaStreams + AkkaPersistence). | |
| - name: Publish NuGet to nuget.org | |
| if: ${{ !contains(github.ref, '-rc') && env.NUGET_API_KEY != '' }} | |
| run: | | |
| dotnet nuget push "artifacts/packages/*.nupkg" \ | |
| --source https://api.nuget.org/v3/index.json \ | |
| --api-key "$NUGET_API_KEY" \ | |
| --skip-duplicate | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| prerelease: ${{ contains(github.ref, '-rc') }} | |
| files: | | |
| artifacts/packages/*.nupkg |