diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 5ebcc50..990fd6f 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -1,28 +1,65 @@ name: .NET Core -on: [push, pull_request] +on: + workflow_dispatch: + push: + tags: + - 'v*.*.*' + branches: + - master + pull_request: + branches: + - master jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive - name: Setup .NET Core - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - name: Build run: | cd Orleans.Providers.MongoDB - dotnet pack --configuration Release + dotnet build --configuration Release + + - name: Test + run: | + cd UnitTest + dotnet test Orleans.Providers.MongoDB.UnitTest.csproj --configuration Release + + publish: + needs: build + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Get version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Pack + run: | + cd Orleans.Providers.MongoDB + dotnet pack --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }} - name: Publish run: | - dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }} - if: github.ref == 'refs/heads/master' \ No newline at end of file + dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }} \ No newline at end of file diff --git a/UnitTest/Orleans.Providers.MongoDB.UnitTest.csproj b/UnitTest/Orleans.Providers.MongoDB.UnitTest.csproj index eecd811..5b55b0c 100644 --- a/UnitTest/Orleans.Providers.MongoDB.UnitTest.csproj +++ b/UnitTest/Orleans.Providers.MongoDB.UnitTest.csproj @@ -1,4 +1,4 @@ - + net8.0 true @@ -10,26 +10,14 @@ - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + - + \ No newline at end of file diff --git a/libs/orleans b/libs/orleans index 71b58f4..92e0bf3 160000 --- a/libs/orleans +++ b/libs/orleans @@ -1 +1 @@ -Subproject commit 71b58f43e0530c5650f01d38c58fd5679762f61e +Subproject commit 92e0bf37048cd8e6c728fba008fd4cfbbd647435