diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index c5e533b..1e2f8cc 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -36,5 +36,30 @@ jobs: run: dotnet pack ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj --configuration Release -p:PackageVersion=${{ steps.semver.outputs.version }} - name: Publish to Episerver run: dotnet nuget push ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/episerver/index.json - - name: Publish to Optimizely - run: dotnet nuget push ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/optimizely/index.json + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }} + path: ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg + + upload_T3: + runs-on: [self-hosted] + needs: [Publish] + steps: + - name: Create artifacts folder + run: | + if (Test-Path -Path "artifacts") { + Remove-Item -LiteralPath "artifacts" -Force -Recurse + } + New-Item -Path "artifacts" -ItemType Directory + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: Optimizely.Graph.Source.Sdk.${{ needs.Publish.outputs.releaseVersion }} + path: artifacts + - name: Publish Nuget + run: | + $sourceDirectory = '${{github.workspace}}\artifacts' + $destinationDirectory = '\\nuget.ep.se\Releases\thisweek' + $file = Get-ChildItem -Path "$sourceDirectory" -Recurse | Where-Object {$_.Name -match 'Optimizely.Graph.Source.Sdk.${{ needs.Publish.outputs.releaseVersion }}.nupkg'} + xcopy $file.FullName $destinationDirectory /Y