Skip to content

Commit 017fc59

Browse files
authored
Merge pull request #20 from episerver/Update-Github-workflow
Revert github workflow changes.
2 parents fc3bef6 + 3dbc40b commit 017fc59

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,30 @@ jobs:
3636
run: dotnet pack ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk.csproj --configuration Release -p:PackageVersion=${{ steps.semver.outputs.version }}
3737
- name: Publish to Episerver
3838
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
39-
- name: Publish to Optimizely
40-
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
39+
- name: Upload Artifact
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}
43+
path: ./Optimizely.Graph.Source.Sdk/Optimizely.Graph.Source.Sdk/bin/Release/Optimizely.Graph.Source.Sdk.${{ steps.semver.outputs.version }}.nupkg
44+
45+
upload_T3:
46+
runs-on: [self-hosted]
47+
needs: [Publish]
48+
steps:
49+
- name: Create artifacts folder
50+
run: |
51+
if (Test-Path -Path "artifacts") {
52+
Remove-Item -LiteralPath "artifacts" -Force -Recurse
53+
}
54+
New-Item -Path "artifacts" -ItemType Directory
55+
- name: Download artifacts
56+
uses: actions/download-artifact@v4
57+
with:
58+
name: Optimizely.Graph.Source.Sdk.${{ needs.Publish.outputs.releaseVersion }}
59+
path: artifacts
60+
- name: Publish Nuget
61+
run: |
62+
$sourceDirectory = '${{github.workspace}}\artifacts'
63+
$destinationDirectory = '\\nuget.ep.se\Releases\thisweek'
64+
$file = Get-ChildItem -Path "$sourceDirectory" -Recurse | Where-Object {$_.Name -match 'Optimizely.Graph.Source.Sdk.${{ needs.Publish.outputs.releaseVersion }}.nupkg'}
65+
xcopy $file.FullName $destinationDirectory /Y

0 commit comments

Comments
 (0)