Skip to content

Commit cee972b

Browse files
authored
Merge pull request #7 from episerver/CG-9150-Creating-nuget-package-using-Github-action-1
Update nuget-publish.yml
2 parents 3e51d2f + f2169d6 commit cee972b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/nuget-publish.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ env:
99
jobs:
1010
Publish:
1111
runs-on: ubuntu-latest
12+
outputs:
13+
releaseVersion: ${{ steps.semver.outputs.version }}
1214
steps:
1315
- uses: actions/checkout@v4
1416
with:
@@ -34,5 +36,15 @@ jobs:
3436
run: dotnet pack ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj --configuration Release -p:PackageVersion=${{ steps.semver.outputs.version }}
3537
- name: Publish to Episerver
3638
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
37-
- name: Publish to Optimizely
38-
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
39+
40+
upload_T3:
41+
runs-on: [self-hosted]
42+
needs: [Publish]
43+
steps:
44+
- name: Publish Nuget
45+
run: |
46+
$sourceDirectory = '${{github.workspace}}\Optimizely.Graph.Source.Sdk\Optimizely.Graph.Source.Sdk\bin\Release\'
47+
$destinationDirectory = '\\nuget.ep.se\Releases\thisweek'
48+
49+
$file = Get-ChildItem -Path "$sourceDirectory" -Recurse | Where-Object {$_.Name -match 'Optimizely.Graph.Source.Sdk.${{ needs.Publish.outputs.releaseVersion }}.nupkg'}
50+
xcopy $file.FullName $destinationDirectory /Y

0 commit comments

Comments
 (0)