Skip to content

Commit

Permalink
Merge pull request #7 from episerver/CG-9150-Creating-nuget-package-u…
Browse files Browse the repository at this point in the history
…sing-Github-action-1

Update nuget-publish.yml
  • Loading branch information
jakeminard authored Jan 16, 2025
2 parents 3e51d2f + f2169d6 commit cee972b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ env:
jobs:
Publish:
runs-on: ubuntu-latest
outputs:
releaseVersion: ${{ steps.semver.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,5 +36,15 @@ 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://api.nuget.optimizely.com/v3/index.json

upload_T3:
runs-on: [self-hosted]
needs: [Publish]
steps:
- name: Publish Nuget
run: |
$sourceDirectory = '${{github.workspace}}\Optimizely.Graph.Source.Sdk\Optimizely.Graph.Source.Sdk\bin\Release\'
$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

0 comments on commit cee972b

Please sign in to comment.